From f32f083c81a5034530ac33ad2bc460dd234186a5 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sun, 4 May 2025 20:43:32 -0400 Subject: [Rust] More cleanup regarding `BnString` - Removed `to_string` shortcut from `BnString`. - Misc formatting --- rust/src/binary_view/memory_map.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust/src/binary_view/memory_map.rs') diff --git a/rust/src/binary_view/memory_map.rs b/rust/src/binary_view/memory_map.rs index 3afe0a20..6b6d3d20 100644 --- a/rust/src/binary_view/memory_map.rs +++ b/rust/src/binary_view/memory_map.rs @@ -21,13 +21,13 @@ impl MemoryMap { /// JSON string representation of the base [`MemoryMap`], consisting of unresolved auto and user segments. pub fn base_description(&self) -> String { let desc_raw = unsafe { BNGetBaseMemoryMapDescription(self.view.handle) }; - unsafe { BnString::from_raw(desc_raw) }.to_string() + unsafe { BnString::into_string(desc_raw) } } /// JSON string representation of the [`MemoryMap`]. pub fn description(&self) -> String { let desc_raw = unsafe { BNGetMemoryMapDescription(self.view.handle) }; - unsafe { BnString::from_raw(desc_raw) }.to_string() + unsafe { BnString::into_string(desc_raw) } } // When enabled, the memory map will present a simplified, logical view that merges and abstracts virtual memory -- cgit v1.3.1