diff options
| author | Mason Reed <mason@vector35.com> | 2025-05-04 20:43:32 -0400 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2025-05-12 17:45:24 -0400 |
| commit | f32f083c81a5034530ac33ad2bc460dd234186a5 (patch) | |
| tree | 02e5799b595322b3a6967977ac69257eb023e882 /rust/src/lib.rs | |
| parent | e12dac56c123bcf39708cb381497753250eb1887 (diff) | |
[Rust] More cleanup regarding `BnString`
- Removed `to_string` shortcut from `BnString`.
- Misc formatting
Diffstat (limited to 'rust/src/lib.rs')
| -rw-r--r-- | rust/src/lib.rs | 9 |
1 files changed, 3 insertions, 6 deletions
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<Path>) -> Result<PathBuf, ()> { 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<Path>) -> Resu pub fn path_relative_to_user_plugin_directory(path: impl AsRef<Path>) -> Result<PathBuf, ()> { 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<Path>) -> Result< pub fn path_relative_to_user_directory(path: impl AsRef<Path>) -> Result<PathBuf, ()> { 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(()); } |
