summaryrefslogtreecommitdiff
path: root/rust/src/custom_binary_view.rs
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-05-05 13:17:30 -0400
committerMason Reed <35282038+emesare@users.noreply.github.com>2025-05-12 17:45:24 -0400
commit9dadf92c16da5cd21def79ae39ca98803c9208ec (patch)
tree3874a659bcb3818f43c1a46ab3ef081b99b47154 /rust/src/custom_binary_view.rs
parent9f5491a56f6af1fa9b030f23d40150673a52aaa1 (diff)
[Rust] Rename `AsCStr` to `IntoCStr`
Diffstat (limited to 'rust/src/custom_binary_view.rs')
-rw-r--r--rust/src/custom_binary_view.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/custom_binary_view.rs b/rust/src/custom_binary_view.rs
index ee32a67f..7e5c0a24 100644
--- a/rust/src/custom_binary_view.rs
+++ b/rust/src/custom_binary_view.rs
@@ -41,7 +41,7 @@ use crate::Endianness;
/// implementation of the `CustomBinaryViewType` must return.
pub fn register_view_type<S, T, F>(name: S, long_name: S, constructor: F) -> &'static T
where
- S: AsCStr,
+ S: IntoCStr,
T: CustomBinaryViewType,
F: FnOnce(BinaryViewType) -> T,
{
@@ -359,7 +359,7 @@ impl BinaryViewType {
}
/// Looks up a BinaryViewType by its short name
- pub fn by_name<N: AsCStr>(name: N) -> Result<Self> {
+ pub fn by_name<N: IntoCStr>(name: N) -> Result<Self> {
let bytes = name.to_cstr();
let handle = unsafe { BNGetBinaryViewTypeByName(bytes.as_ref().as_ptr() as *const _) };
match handle.is_null() {