From 193dea95daedde471e6f1fbcbeaf1932c6fbd50c Mon Sep 17 00:00:00 2001 From: Rubens Brandao Date: Sat, 6 Apr 2024 16:32:00 -0300 Subject: replace BStr with str --- rust/src/custombinaryview.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust/src/custombinaryview.rs') 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, -- cgit v1.3.1