summaryrefslogtreecommitdiff
path: root/rust/src/repository.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/repository.rs')
-rw-r--r--rust/src/repository.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/rust/src/repository.rs b/rust/src/repository.rs
index 90e414d5..8d2fbafe 100644
--- a/rust/src/repository.rs
+++ b/rust/src/repository.rs
@@ -9,7 +9,7 @@ use binaryninjacore_sys::*;
use crate::rc::{Array, CoreArrayProvider, CoreArrayProviderInner, Guard, Ref, RefCountable};
use crate::repository::plugin::RepositoryPlugin;
-use crate::string::{BnStrCompatible, BnString};
+use crate::string::{AsCStr, BnString};
pub use manager::RepositoryManager;
@@ -52,8 +52,8 @@ impl Repository {
unsafe { Array::new(result, count, ()) }
}
- pub fn plugin_by_path<S: BnStrCompatible>(&self, path: S) -> Option<Ref<RepositoryPlugin>> {
- let path = path.into_bytes_with_nul();
+ pub fn plugin_by_path<S: AsCStr>(&self, path: S) -> Option<Ref<RepositoryPlugin>> {
+ let path = path.to_cstr();
let result = unsafe {
BNRepositoryGetPluginByPath(
self.handle.as_ptr(),