diff options
Diffstat (limited to 'rust/src/custombinaryview.rs')
| -rw-r--r-- | rust/src/custombinaryview.rs | 4 |
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, |
