summaryrefslogtreecommitdiff
path: root/rust/src/custombinaryview.rs
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2022-07-21 15:24:16 -0400
committerGlenn Smith <glenn@vector35.com>2022-09-29 21:02:22 -0400
commitd552ae9beae6404c13548b98ec7a7ec4e6b3dd90 (patch)
tree00a2696b2a3a33b1ac5bb058801fdea9f1a38c03 /rust/src/custombinaryview.rs
parent2e18783a2f6e29c225d177e8a0fb866a9c9d85df (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.rs6
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 _) };