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/enterprise.rs | |
| parent | 9f5491a56f6af1fa9b030f23d40150673a52aaa1 (diff) | |
[Rust] Rename `AsCStr` to `IntoCStr`
Diffstat (limited to 'rust/src/enterprise.rs')
| -rw-r--r-- | rust/src/enterprise.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rust/src/enterprise.rs b/rust/src/enterprise.rs index 74389d45..7c2aad19 100644 --- a/rust/src/enterprise.rs +++ b/rust/src/enterprise.rs @@ -1,5 +1,5 @@ use crate::rc::Array; -use crate::string::{AsCStr, BnString}; +use crate::string::{BnString, IntoCStr}; use std::ffi::c_void; use std::marker::PhantomData; use std::time::{Duration, SystemTime, UNIX_EPOCH}; @@ -120,7 +120,7 @@ pub fn server_url() -> String { unsafe { BnString::into_string(binaryninjacore_sys::BNGetEnterpriseServerUrl()) } } -pub fn set_server_url<S: AsCStr>(url: S) -> Result<(), ()> { +pub fn set_server_url<S: IntoCStr>(url: S) -> Result<(), ()> { let url = url.to_cstr(); let result = unsafe { binaryninjacore_sys::BNSetEnterpriseServerUrl( @@ -185,8 +185,8 @@ pub fn is_server_license_still_activated() -> bool { pub fn authenticate_server_with_credentials<U, P>(username: U, password: P, remember: bool) -> bool where - U: AsCStr, - P: AsCStr, + U: IntoCStr, + P: IntoCStr, { let username = username.to_cstr(); let password = password.to_cstr(); @@ -199,7 +199,7 @@ where } } -pub fn authenticate_server_with_method<S: AsCStr>(method: S, remember: bool) -> bool { +pub fn authenticate_server_with_method<S: IntoCStr>(method: S, remember: bool) -> bool { let method = method.to_cstr(); unsafe { binaryninjacore_sys::BNAuthenticateEnterpriseServerWithMethod( |
