summaryrefslogtreecommitdiff
path: root/rust/src/collaboration
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/collaboration')
-rw-r--r--rust/src/collaboration/remote.rs7
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(())
}