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/repository/manager.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rust/src/repository') 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(plugins_path: S) -> Ref { + pub fn new(plugins_path: S) -> Ref { 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(&self, url: U, repository_path: P) -> bool { + pub fn add_repository(&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(&self, path: P) -> Option { + pub fn repository_by_path(&self, path: P) -> Option { let path = path.to_cstr(); let result = unsafe { BNRepositoryGetRepositoryByPath(self.handle.as_ptr(), path.as_ptr()) }; -- cgit v1.3.1