diff options
| author | Glenn Smith <glenn@vector35.com> | 2022-07-21 15:24:16 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2022-09-29 21:02:22 -0400 |
| commit | d552ae9beae6404c13548b98ec7a7ec4e6b3dd90 (patch) | |
| tree | 00a2696b2a3a33b1ac5bb058801fdea9f1a38c03 /rust/src/custombinaryview.rs | |
| parent | 2e18783a2f6e29c225d177e8a0fb866a9c9d85df (diff) | |
[Rust API] Better name for this trait fn, more CC support
Diffstat (limited to 'rust/src/custombinaryview.rs')
| -rw-r--r-- | rust/src/custombinaryview.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rust/src/custombinaryview.rs b/rust/src/custombinaryview.rs index 13470517..443d6384 100644 --- a/rust/src/custombinaryview.rs +++ b/rust/src/custombinaryview.rs @@ -115,10 +115,10 @@ where }) } - let name = name.as_bytes_with_nul(); + let name = name.into_bytes_with_nul(); let name_ptr = name.as_ref().as_ptr() as *mut _; - let long_name = long_name.as_bytes_with_nul(); + let long_name = long_name.into_bytes_with_nul(); let long_name_ptr = long_name.as_ref().as_ptr() as *mut _; let ctxt = Box::new(unsafe { mem::zeroed() }); @@ -232,7 +232,7 @@ impl BinaryViewType { /// Looks up a BinaryViewType by its short name pub fn by_name<N: BnStrCompatible>(name: N) -> Result<Self> { - let bytes = name.as_bytes_with_nul(); + let bytes = name.into_bytes_with_nul(); let res = unsafe { BNGetBinaryViewTypeByName(bytes.as_ref().as_ptr() as *const _) }; |
