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/section.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rust/src/section.rs') diff --git a/rust/src/section.rs b/rust/src/section.rs index 9790801c..da43763d 100644 --- a/rust/src/section.rs +++ b/rust/src/section.rs @@ -245,10 +245,10 @@ impl SectionBuilder { } pub(crate) fn create(self, view: &BinaryView) { - let name = self.name.as_bytes_with_nul(); - let ty = self._ty.map(|s| s.as_bytes_with_nul()); - let linked_section = self.linked_section.map(|s| s.as_bytes_with_nul()); - let info_section = self.info_section.map(|s| s.as_bytes_with_nul()); + let name = self.name.into_bytes_with_nul(); + let ty = self._ty.map(|s| s.into_bytes_with_nul()); + let linked_section = self.linked_section.map(|s| s.into_bytes_with_nul()); + let info_section = self.info_section.map(|s| s.into_bytes_with_nul()); let start = self.range.start; let len = self.range.end.wrapping_sub(start); -- cgit v1.3.1