From d552ae9beae6404c13548b98ec7a7ec4e6b3dd90 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Thu, 21 Jul 2022 15:24:16 -0400 Subject: [Rust API] Better name for this trait fn, more CC support --- rust/src/function.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust/src/function.rs') 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(&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(&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 _); -- cgit v1.3.1