From f32f083c81a5034530ac33ad2bc460dd234186a5 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sun, 4 May 2025 20:43:32 -0400 Subject: [Rust] More cleanup regarding `BnString` - Removed `to_string` shortcut from `BnString`. - Misc formatting --- rust/src/lib.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'rust/src/lib.rs') diff --git a/rust/src/lib.rs b/rust/src/lib.rs index c0b3a38c..08abc349 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -329,8 +329,7 @@ pub fn save_last_run() { pub fn path_relative_to_bundled_plugin_directory(path: impl AsRef) -> Result { let path_raw = path.as_ref().to_cstr(); - let s: *mut c_char = - unsafe { BNGetPathRelativeToBundledPluginDirectory(path_raw.as_ptr()) }; + let s: *mut c_char = unsafe { BNGetPathRelativeToBundledPluginDirectory(path_raw.as_ptr()) }; if s.is_null() { return Err(()); } @@ -339,8 +338,7 @@ pub fn path_relative_to_bundled_plugin_directory(path: impl AsRef) -> Resu pub fn path_relative_to_user_plugin_directory(path: impl AsRef) -> Result { let path_raw = path.as_ref().to_cstr(); - let s: *mut c_char = - unsafe { BNGetPathRelativeToUserPluginDirectory(path_raw.as_ptr()) }; + let s: *mut c_char = unsafe { BNGetPathRelativeToUserPluginDirectory(path_raw.as_ptr()) }; if s.is_null() { return Err(()); } @@ -349,8 +347,7 @@ pub fn path_relative_to_user_plugin_directory(path: impl AsRef) -> Result< pub fn path_relative_to_user_directory(path: impl AsRef) -> Result { let path_raw = path.as_ref().to_cstr(); - let s: *mut c_char = - unsafe { BNGetPathRelativeToUserDirectory(path_raw.as_ptr()) }; + let s: *mut c_char = unsafe { BNGetPathRelativeToUserDirectory(path_raw.as_ptr()) }; if s.is_null() { return Err(()); } -- cgit v1.3.1