summaryrefslogtreecommitdiff
path: root/rust/src/interaction
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-05-12 16:43:42 -0400
committerMason Reed <35282038+emesare@users.noreply.github.com>2025-05-12 17:45:24 -0400
commit811fb8543a66705594647fd76cfaf4f3fd02fda4 (patch)
tree691a122a128ef18db09748b71239392c3e46872c /rust/src/interaction
parent631222aaf4afc218741deb9307edc01ecb26c109 (diff)
[Rust] Misc cleanup regarding c strings
Diffstat (limited to 'rust/src/interaction')
-rw-r--r--rust/src/interaction/report.rs19
1 files changed, 9 insertions, 10 deletions
diff --git a/rust/src/interaction/report.rs b/rust/src/interaction/report.rs
index 689b815b..415845db 100644
--- a/rust/src/interaction/report.rs
+++ b/rust/src/interaction/report.rs
@@ -1,4 +1,3 @@
-use std::ffi::c_char;
use std::ptr::NonNull;
use binaryninjacore_sys::*;
@@ -81,8 +80,8 @@ impl ReportCollection {
BNAddPlainTextReportToCollection(
self.handle.as_ptr(),
view.handle,
- title.as_ref().as_ptr() as *const c_char,
- contents.as_ref().as_ptr() as *const c_char,
+ title.as_ptr(),
+ contents.as_ptr(),
)
}
}
@@ -95,9 +94,9 @@ impl ReportCollection {
BNAddMarkdownReportToCollection(
self.handle.as_ptr(),
view.handle,
- title.as_ref().as_ptr() as *const c_char,
- contents.as_ref().as_ptr() as *const c_char,
- plaintext.as_ref().as_ptr() as *const c_char,
+ title.as_ptr(),
+ contents.as_ptr(),
+ plaintext.as_ptr(),
)
}
}
@@ -110,9 +109,9 @@ impl ReportCollection {
BNAddHTMLReportToCollection(
self.handle.as_ptr(),
view.handle,
- title.as_ref().as_ptr() as *const c_char,
- contents.as_ref().as_ptr() as *const c_char,
- plaintext.as_ref().as_ptr() as *const c_char,
+ title.as_ptr(),
+ contents.as_ptr(),
+ plaintext.as_ptr(),
)
}
}
@@ -123,7 +122,7 @@ impl ReportCollection {
BNAddGraphReportToCollection(
self.handle.as_ptr(),
view.handle,
- title.as_ref().as_ptr() as *const c_char,
+ title.as_ptr(),
graph.handle,
)
}