summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVisual Ehrmanntraut <30368284+VisualEhrmanntraut@users.noreply.github.com>2025-01-27 11:37:34 +0200
committermason <35282038+emesare@users.noreply.github.com>2025-01-27 09:55:06 -0500
commitd059f992d23f2796e51d1633befd53a6abccf00d (patch)
treecba0290fcacee7dd1dc0ac20697716970c99a682
parent49ffbccb38042ff0b8f17a57ebf1e43eff9a4ffc (diff)
Fix rust EnumerationBuilder method return types
-rw-r--r--rust/src/types.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/src/types.rs b/rust/src/types.rs
index 701fc85a..54c25234 100644
--- a/rust/src/types.rs
+++ b/rust/src/types.rs
@@ -1217,7 +1217,7 @@ impl EnumerationBuilder {
unsafe { Enumeration::ref_from_raw(BNFinalizeEnumerationBuilder(self.handle)) }
}
- pub fn append<S: BnStrCompatible>(&mut self, name: S) -> &Self {
+ pub fn append<S: BnStrCompatible>(&mut self, name: S) -> &mut Self {
let name = name.into_bytes_with_nul();
unsafe {
BNAddEnumerationBuilderMember(self.handle, name.as_ref().as_ptr() as _);
@@ -1225,7 +1225,7 @@ impl EnumerationBuilder {
self
}
- pub fn insert<S: BnStrCompatible>(&mut self, name: S, value: u64) -> &Self {
+ pub fn insert<S: BnStrCompatible>(&mut self, name: S, value: u64) -> &mut Self {
let name = name.into_bytes_with_nul();
unsafe {
BNAddEnumerationBuilderMemberWithValue(self.handle, name.as_ref().as_ptr() as _, value);
@@ -1233,7 +1233,7 @@ impl EnumerationBuilder {
self
}
- pub fn replace<S: BnStrCompatible>(&mut self, id: usize, name: S, value: u64) -> &Self {
+ pub fn replace<S: BnStrCompatible>(&mut self, id: usize, name: S, value: u64) -> &mut Self {
let name = name.into_bytes_with_nul();
unsafe {
BNReplaceEnumerationBuilderMember(self.handle, id, name.as_ref().as_ptr() as _, value);
@@ -1241,7 +1241,7 @@ impl EnumerationBuilder {
self
}
- pub fn remove(&mut self, id: usize) -> &Self {
+ pub fn remove(&mut self, id: usize) -> &mut Self {
unsafe {
BNRemoveEnumerationBuilderMember(self.handle, id);
}