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/project/folder.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'rust/src/project/folder.rs') diff --git a/rust/src/project/folder.rs b/rust/src/project/folder.rs index c7ec82e4..acb663fb 100644 --- a/rust/src/project/folder.rs +++ b/rust/src/project/folder.rs @@ -1,7 +1,7 @@ use crate::progress::{NoProgressCallback, ProgressCallback}; use crate::project::Project; use crate::rc::{CoreArrayProvider, CoreArrayProviderInner, Guard, Ref, RefCountable}; -use crate::string::{AsCStr, BnString}; +use crate::string::{BnString, IntoCStr}; use binaryninjacore_sys::{ BNFreeProjectFolder, BNFreeProjectFolderList, BNNewProjectFolderReference, BNProjectFolder, BNProjectFolderExport, BNProjectFolderGetDescription, BNProjectFolderGetId, @@ -46,7 +46,7 @@ impl ProjectFolder { } /// Set the name of this folder - pub fn set_name(&self, value: S) -> bool { + pub fn set_name(&self, value: S) -> bool { let value_raw = value.to_cstr(); unsafe { BNProjectFolderSetName(self.handle.as_ptr(), value_raw.as_ptr()) } } @@ -57,7 +57,7 @@ impl ProjectFolder { } /// Set the description of this folder - pub fn set_description(&self, value: S) -> bool { + pub fn set_description(&self, value: S) -> bool { let value_raw = value.to_cstr(); unsafe { BNProjectFolderSetDescription(self.handle.as_ptr(), value_raw.as_ptr()) } } @@ -78,7 +78,7 @@ impl ProjectFolder { /// Recursively export this folder to disk, returns `true' if the export succeeded /// /// * `dest` - Destination path for the exported contents - pub fn export(&self, dest: S) -> bool { + pub fn export(&self, dest: S) -> bool { self.export_with_progress(dest, NoProgressCallback) } @@ -89,7 +89,7 @@ impl ProjectFolder { /// * `progress` - [`ProgressCallback`] that will be called as contents are exporting pub fn export_with_progress(&self, dest: S, mut progress: P) -> bool where - S: AsCStr, + S: IntoCStr, P: ProgressCallback, { let dest_raw = dest.to_cstr(); -- cgit v1.3.1