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/platform.rs | |
| parent | 9f5491a56f6af1fa9b030f23d40150673a52aaa1 (diff) | |
[Rust] Rename `AsCStr` to `IntoCStr`
Diffstat (limited to 'rust/src/platform.rs')
| -rw-r--r-- | rust/src/platform.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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<S: AsCStr>(name: S) -> Option<Ref<Self>> { + pub fn by_name<S: IntoCStr>(name: S) -> Option<Ref<Self>> { 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<S: AsCStr>(name: S) -> Array<Platform> { + pub fn list_by_os<S: IntoCStr>(name: S) -> Array<Platform> { let raw_name = name.to_cstr(); unsafe { @@ -124,7 +124,7 @@ impl Platform { } } - pub fn list_by_os_and_arch<S: AsCStr>(name: S, arch: &CoreArchitecture) -> Array<Platform> { + pub fn list_by_os_and_arch<S: IntoCStr>(name: S, arch: &CoreArchitecture) -> Array<Platform> { let raw_name = name.to_cstr(); unsafe { @@ -145,7 +145,7 @@ impl Platform { } } - pub fn new<A: Architecture, S: AsCStr>(arch: &A, name: S) -> Ref<Self> { + pub fn new<A: Architecture, S: IntoCStr>(arch: &A, name: S) -> Ref<Self> { 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<T: AsCStr>(&self, name: T) -> Array<TypeLibrary> { + pub fn get_type_libraries_by_name<T: IntoCStr>(&self, name: T) -> Array<TypeLibrary> { 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<S: AsCStr>(&self, os: S) { + pub fn register_os<S: IntoCStr>(&self, os: S) { let os = os.to_cstr(); unsafe { |
