summaryrefslogtreecommitdiff
path: root/rust/src/repository
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-05-05 13:17:30 -0400
committerMason Reed <35282038+emesare@users.noreply.github.com>2025-05-12 17:45:24 -0400
commit9dadf92c16da5cd21def79ae39ca98803c9208ec (patch)
tree3874a659bcb3818f43c1a46ab3ef081b99b47154 /rust/src/repository
parent9f5491a56f6af1fa9b030f23d40150673a52aaa1 (diff)
[Rust] Rename `AsCStr` to `IntoCStr`
Diffstat (limited to 'rust/src/repository')
-rw-r--r--rust/src/repository/manager.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/src/repository/manager.rs b/rust/src/repository/manager.rs
index 29c73605..42d8aa42 100644
--- a/rust/src/repository/manager.rs
+++ b/rust/src/repository/manager.rs
@@ -1,6 +1,6 @@
use crate::rc::{Array, Ref, RefCountable};
use crate::repository::Repository;
-use crate::string::AsCStr;
+use crate::string::IntoCStr;
use binaryninjacore_sys::{
BNCreateRepositoryManager, BNFreeRepositoryManager, BNGetRepositoryManager,
BNNewRepositoryManagerReference, BNRepositoryGetRepositoryByPath, BNRepositoryManager,
@@ -28,7 +28,7 @@ impl RepositoryManager {
Ref::new(Self { handle })
}
- pub fn new<S: AsCStr>(plugins_path: S) -> Ref<Self> {
+ pub fn new<S: IntoCStr>(plugins_path: S) -> Ref<Self> {
let plugins_path = plugins_path.to_cstr();
let result = unsafe { BNCreateRepositoryManager(plugins_path.as_ptr()) };
unsafe { Self::ref_from_raw(NonNull::new(result).unwrap()) }
@@ -59,7 +59,7 @@ impl RepositoryManager {
/// * `repository_path` - path to where the repository will be stored on disk locally
///
/// Returns true if the repository was successfully added, false otherwise.
- pub fn add_repository<U: AsCStr, P: AsCStr>(&self, url: U, repository_path: P) -> bool {
+ pub fn add_repository<U: IntoCStr, P: IntoCStr>(&self, url: U, repository_path: P) -> bool {
let url = url.to_cstr();
let repo_path = repository_path.to_cstr();
unsafe {
@@ -67,7 +67,7 @@ impl RepositoryManager {
}
}
- pub fn repository_by_path<P: AsCStr>(&self, path: P) -> Option<Repository> {
+ pub fn repository_by_path<P: IntoCStr>(&self, path: P) -> Option<Repository> {
let path = path.to_cstr();
let result =
unsafe { BNRepositoryGetRepositoryByPath(self.handle.as_ptr(), path.as_ptr()) };