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/collaboration/remote.rs | |
| parent | e12dac56c123bcf39708cb381497753250eb1887 (diff) | |
[Rust] More cleanup regarding `BnString`
- Removed `to_string` shortcut from `BnString`.
- Misc formatting
Diffstat (limited to 'rust/src/collaboration/remote.rs')
| -rw-r--r-- | rust/src/collaboration/remote.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/rust/src/collaboration/remote.rs b/rust/src/collaboration/remote.rs index ee37e9fb..4d69873a 100644 --- a/rust/src/collaboration/remote.rs +++ b/rust/src/collaboration/remote.rs @@ -167,7 +167,7 @@ impl Remote { &self, username: U, password: P, - ) -> Option<BnString> { + ) -> Option<String> { let username = username.to_cstr(); let password = password.to_cstr(); let token = unsafe { @@ -180,7 +180,7 @@ impl Remote { if token.is_null() { None } else { - Some(unsafe { BnString::from_raw(token) }) + Some(unsafe { BnString::into_string(token) }) } } @@ -226,7 +226,8 @@ impl Remote { }; let username = options.username.to_cstr(); let token = token.to_cstr(); - let success = unsafe { BNRemoteConnect(self.handle.as_ptr(), username.as_ptr(), token.as_ptr()) }; + let success = + unsafe { BNRemoteConnect(self.handle.as_ptr(), username.as_ptr(), token.as_ptr()) }; success.then_some(()).ok_or(()) } |
