From 9dadf92c16da5cd21def79ae39ca98803c9208ec Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Mon, 5 May 2025 13:17:30 -0400 Subject: [Rust] Rename `AsCStr` to `IntoCStr` --- rust/src/platform.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'rust/src/platform.rs') diff --git a/rust/src/platform.rs b/rust/src/platform.rs index b51ad61d..d7d3b990 100644 --- a/rust/src/platform.rs +++ b/rust/src/platform.rs @@ -82,7 +82,7 @@ impl Platform { Ref::new(Self { handle }) } - pub fn by_name(name: S) -> Option> { + pub fn by_name(name: S) -> Option> { let raw_name = name.to_cstr(); unsafe { let res = BNGetPlatformByName(raw_name.as_ptr()); @@ -113,7 +113,7 @@ impl Platform { } } - pub fn list_by_os(name: S) -> Array { + pub fn list_by_os(name: S) -> Array { let raw_name = name.to_cstr(); unsafe { @@ -124,7 +124,7 @@ impl Platform { } } - pub fn list_by_os_and_arch(name: S, arch: &CoreArchitecture) -> Array { + pub fn list_by_os_and_arch(name: S, arch: &CoreArchitecture) -> Array { let raw_name = name.to_cstr(); unsafe { @@ -145,7 +145,7 @@ impl Platform { } } - pub fn new(arch: &A, name: S) -> Ref { + pub fn new(arch: &A, name: S) -> Ref { let name = name.to_cstr(); unsafe { let handle = BNCreatePlatform(arch.as_ref().handle, name.as_ptr()); @@ -173,7 +173,7 @@ impl Platform { unsafe { TypeContainer::from_raw(type_container_ptr.unwrap()) } } - pub fn get_type_libraries_by_name(&self, name: T) -> Array { + pub fn get_type_libraries_by_name(&self, name: T) -> Array { let mut count = 0; let name = name.to_cstr(); let result = @@ -182,7 +182,7 @@ impl Platform { unsafe { Array::new(result, count, ()) } } - pub fn register_os(&self, os: S) { + pub fn register_os(&self, os: S) { let os = os.to_cstr(); unsafe { -- cgit v1.3.1