summaryrefslogtreecommitdiff
path: root/rust/src/collaboration/merge.rs
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-05-03 23:15:17 -0400
committerMason Reed <35282038+emesare@users.noreply.github.com>2025-05-12 17:45:24 -0400
commit6264254065bbae9d89f51cf3330379b7ace09592 (patch)
tree9ece1d1739215c2faef2d808ef4fdc019ad527fa /rust/src/collaboration/merge.rs
parentc3fdda9727f5507818e3f55576ad32215a22b0f9 (diff)
[Rust] Return `String` instead of `BnString` for cases where lossy conversion can be tolerated
Still need to go and audit all usage, but realistically the most important places to give the user control are with symbols, where the data can come from non utf8 sources This is still incomplete, I just looked for usage of -> BnString so any other variant was omitted.
Diffstat (limited to 'rust/src/collaboration/merge.rs')
-rw-r--r--rust/src/collaboration/merge.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/src/collaboration/merge.rs b/rust/src/collaboration/merge.rs
index 2d28725c..68bfdc02 100644
--- a/rust/src/collaboration/merge.rs
+++ b/rust/src/collaboration/merge.rs
@@ -108,18 +108,18 @@ impl MergeConflict {
/// String representing the type name of the data, not the same as data_type.
/// This is like "typeName" or "tag" depending on what object the conflict represents.
- pub fn conflict_type(&self) -> BnString {
+ pub fn conflict_type(&self) -> String {
let result = unsafe { BNAnalysisMergeConflictGetType(self.handle.as_ptr()) };
assert!(!result.is_null());
- unsafe { BnString::from_raw(result) }
+ unsafe { BnString::into_string(result) }
}
/// Lookup key for the merge conflict, ideally a tree path that contains the name of the conflict
/// and all the recursive children leading up to this conflict.
- pub fn key(&self) -> BnString {
+ pub fn key(&self) -> String {
let result = unsafe { BNAnalysisMergeConflictGetKey(self.handle.as_ptr()) };
assert!(!result.is_null());
- unsafe { BnString::from_raw(result) }
+ unsafe { BnString::into_string(result) }
}
/// Call this when you've resolved the conflict to save the result