From d552ae9beae6404c13548b98ec7a7ec4e6b3dd90 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Thu, 21 Jul 2022 15:24:16 -0400 Subject: [Rust API] Better name for this trait fn, more CC support --- rust/src/architecture.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust/src/architecture.rs') diff --git a/rust/src/architecture.rs b/rust/src/architecture.rs index 878b2c5e..f1cdead0 100644 --- a/rust/src/architecture.rs +++ b/rust/src/architecture.rs @@ -1048,7 +1048,7 @@ macro_rules! cc_func { /// Contains helper methods for all types implementing 'Architecture' pub trait ArchitectureExt: Architecture { fn register_by_name(&self, name: S) -> Option { - let name = name.as_bytes_with_nul(); + let name = name.into_bytes_with_nul(); match unsafe { BNGetArchitectureRegisterByName(self.as_ref().0, name.as_ref().as_ptr() as *mut _) @@ -1906,7 +1906,7 @@ where false } - let name = name.as_bytes_with_nul(); + let name = name.into_bytes_with_nul(); let uninit_arch = ArchitectureBuilder { arch: unsafe { zeroed() }, -- cgit v1.3.1