diff options
| author | Mason Reed <mason@vector35.com> | 2025-05-07 23:20:15 -0400 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2025-05-12 17:45:24 -0400 |
| commit | 36a7bb2da7f77074203f5d785dbd82afe1befcad (patch) | |
| tree | 869974517d8a77badfb67366e01d20c048659e0b /rust/src/binary_view.rs | |
| parent | f2ecf39fac3b4d7bb97d254ba3b2552b2ddd90ad (diff) | |
[Rust] Retain core string for section strings
Might want to key off the section string in the core, so we should give it back as a `BnString`
Diffstat (limited to 'rust/src/binary_view.rs')
| -rw-r--r-- | rust/src/binary_view.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rust/src/binary_view.rs b/rust/src/binary_view.rs index 35383f0b..04a60a0d 100644 --- a/rust/src/binary_view.rs +++ b/rust/src/binary_view.rs @@ -871,7 +871,7 @@ pub trait BinaryViewExt: BinaryViewBase { section.create(self.as_ref()); } - fn remove_auto_section(&self, name: &str) { + fn remove_auto_section(&self, name: impl IntoCStr) { let raw_name = name.to_cstr(); let raw_name_ptr = raw_name.as_ptr(); unsafe { @@ -879,7 +879,7 @@ pub trait BinaryViewExt: BinaryViewBase { } } - fn remove_user_section(&self, name: &str) { + fn remove_user_section(&self, name: impl IntoCStr) { let raw_name = name.to_cstr(); let raw_name_ptr = raw_name.as_ptr(); unsafe { @@ -887,7 +887,7 @@ pub trait BinaryViewExt: BinaryViewBase { } } - fn section_by_name(&self, name: &str) -> Option<Ref<Section>> { + fn section_by_name(&self, name: impl IntoCStr) -> Option<Ref<Section>> { unsafe { let raw_name = name.to_cstr(); let name_ptr = raw_name.as_ptr(); |
