summaryrefslogtreecommitdiff
path: root/rust/src/custombinaryview.rs
diff options
context:
space:
mode:
authorRubens Brandao <git@rubens.io>2024-04-06 16:32:00 -0300
committerKyle Martin <krm504@nyu.edu>2024-04-09 13:39:49 -0400
commit193dea95daedde471e6f1fbcbeaf1932c6fbd50c (patch)
tree99be67d81a899543ed5e4636eea3d589583e48a5 /rust/src/custombinaryview.rs
parenta6b48153b64a227c3492d77a96e679b8c469034c (diff)
replace BStr with str
Diffstat (limited to 'rust/src/custombinaryview.rs')
-rw-r--r--rust/src/custombinaryview.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/custombinaryview.rs b/rust/src/custombinaryview.rs
index 21b63c91..956be9bd 100644
--- a/rust/src/custombinaryview.rs
+++ b/rust/src/custombinaryview.rs
@@ -388,7 +388,7 @@ impl<'a, T: CustomBinaryViewType> CustomViewBuilder<'a, T> {
let view_name = view_type.name();
- if let Ok(bv) = file.get_view_of_type(view_name.as_cstr()) {
+ if let Ok(bv) = file.get_view_of_type(view_name.as_str()) {
// while it seems to work most of the time, you can get really unlucky
// if the a free of the existing view of the same type kicks off while
// BNCreateBinaryViewOfType is still running. the freeObject callback
@@ -772,7 +772,7 @@ impl<'a, T: CustomBinaryViewType> CustomViewBuilder<'a, T> {
unsafe {
let res = BNCreateCustomBinaryView(
- view_name.as_cstr().as_ptr(),
+ view_name.as_ptr(),
file.handle,
parent.handle,
&mut bn_obj,