summaryrefslogtreecommitdiff
path: root/rust/src/function.rs
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2022-07-21 15:24:16 -0400
committerGlenn Smith <glenn@vector35.com>2022-09-29 21:02:22 -0400
commitd552ae9beae6404c13548b98ec7a7ec4e6b3dd90 (patch)
tree00a2696b2a3a33b1ac5bb058801fdea9f1a38c03 /rust/src/function.rs
parent2e18783a2f6e29c225d177e8a0fb866a9c9d85df (diff)
[Rust API] Better name for this trait fn, more CC support
Diffstat (limited to 'rust/src/function.rs')
-rw-r--r--rust/src/function.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs
index 079d0ae5..16debf18 100644
--- a/rust/src/function.rs
+++ b/rust/src/function.rs
@@ -164,7 +164,7 @@ impl Function {
}
pub fn set_comment<S: BnStrCompatible>(&self, comment: S) {
- let raw = comment.as_bytes_with_nul();
+ let raw = comment.into_bytes_with_nul();
unsafe {
BNSetFunctionComment(self.handle, raw.as_ref().as_ptr() as *mut _);
@@ -176,7 +176,7 @@ impl Function {
}
pub fn set_comment_at<S: BnStrCompatible>(&self, addr: u64, comment: S) {
- let raw = comment.as_bytes_with_nul();
+ let raw = comment.into_bytes_with_nul();
unsafe {
BNSetCommentForAddress(self.handle, addr, raw.as_ref().as_ptr() as *mut _);