summaryrefslogtreecommitdiff
path: root/rust/src/database
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/database')
-rw-r--r--rust/src/database/snapshot.rs4
-rw-r--r--rust/src/database/undo.rs8
2 files changed, 6 insertions, 6 deletions
diff --git a/rust/src/database/snapshot.rs b/rust/src/database/snapshot.rs
index 35b0dc46..3768138c 100644
--- a/rust/src/database/snapshot.rs
+++ b/rust/src/database/snapshot.rs
@@ -45,8 +45,8 @@ impl Snapshot {
}
/// Get the displayed snapshot name
- pub fn name(&self) -> BnString {
- unsafe { BnString::from_raw(BNGetSnapshotName(self.handle.as_ptr())) }
+ pub fn name(&self) -> String {
+ unsafe { BnString::into_string(BNGetSnapshotName(self.handle.as_ptr())) }
}
/// Set the displayed snapshot name
diff --git a/rust/src/database/undo.rs b/rust/src/database/undo.rs
index 727a777b..a2001b72 100644
--- a/rust/src/database/undo.rs
+++ b/rust/src/database/undo.rs
@@ -26,10 +26,10 @@ impl UndoEntry {
Ref::new(Self { handle })
}
- pub fn id(&self) -> BnString {
+ pub fn id(&self) -> String {
let result = unsafe { BNUndoEntryGetId(self.handle.as_ptr()) };
assert!(!result.is_null());
- unsafe { BnString::from_raw(result) }
+ unsafe { BnString::into_string(result) }
}
pub fn actions(&self) -> Array<UndoAction> {
@@ -115,10 +115,10 @@ impl UndoAction {
}
/// Gets the [`UndoAction`] summary as text rather than [`InstructionTextToken`]'s.
- pub fn summary_as_string(&self) -> BnString {
+ pub fn summary_as_string(&self) -> String {
let result = unsafe { BNUndoActionGetSummaryText(self.handle.as_ptr()) };
assert!(!result.is_null());
- unsafe { BnString::from_raw(result) }
+ unsafe { BnString::into_string(result) }
}
}