diff options
| author | Mason Reed <mason@vector35.com> | 2025-05-05 13:17:30 -0400 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2025-05-12 17:45:24 -0400 |
| commit | 9dadf92c16da5cd21def79ae39ca98803c9208ec (patch) | |
| tree | 3874a659bcb3818f43c1a46ab3ef081b99b47154 /rust/src/architecture.rs | |
| parent | 9f5491a56f6af1fa9b030f23d40150673a52aaa1 (diff) | |
[Rust] Rename `AsCStr` to `IntoCStr`
Diffstat (limited to 'rust/src/architecture.rs')
| -rw-r--r-- | rust/src/architecture.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/src/architecture.rs b/rust/src/architecture.rs index 62693800..c02fc717 100644 --- a/rust/src/architecture.rs +++ b/rust/src/architecture.rs @@ -27,7 +27,7 @@ use crate::{ platform::Platform, rc::*, relocation::CoreRelocationHandler, - string::AsCStr, + string::IntoCStr, string::*, types::{NameAndType, Type}, Endianness, @@ -1953,7 +1953,7 @@ macro_rules! cc_func { /// Contains helper methods for all types implementing 'Architecture' pub trait ArchitectureExt: Architecture { - fn register_by_name<S: AsCStr>(&self, name: S) -> Option<Self::Register> { + fn register_by_name<S: IntoCStr>(&self, name: S) -> Option<Self::Register> { let name = name.to_cstr(); match unsafe { BNGetArchitectureRegisterByName(self.as_ref().handle, name.as_ptr()) } { @@ -2031,7 +2031,7 @@ pub trait ArchitectureExt: Architecture { fn register_relocation_handler<S, R, F>(&self, name: S, func: F) where - S: AsCStr, + S: IntoCStr, R: 'static + RelocationHandler<Handle = CustomRelocationHandlerHandle<R>> + Send @@ -2054,7 +2054,7 @@ impl<T: Architecture> ArchitectureExt for T {} pub fn register_architecture<S, A, F>(name: S, func: F) -> &'static A where - S: AsCStr, + S: IntoCStr, A: 'static + Architecture<Handle = CustomArchitectureHandle<A>> + Send + Sync + Sized, F: FnOnce(CustomArchitectureHandle<A>, CoreArchitecture) -> A, { |
