From 501fe3ec7a63a534fca3926a5fc4267f6886f089 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sun, 7 Dec 2025 15:03:44 -0500 Subject: [Rust] Move architecture module code into more reasonable files To keep backwards compatibility for commonly referenced code we re-export them within the architecture module. Also does some light refactoring of some newly added APIs to keep them more consistent with other parts of the codebase. --- rust/src/binary_view.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rust/src/binary_view.rs') diff --git a/rust/src/binary_view.rs b/rust/src/binary_view.rs index e1b7a5c0..31bdeb89 100644 --- a/rust/src/binary_view.rs +++ b/rust/src/binary_view.rs @@ -1466,12 +1466,12 @@ pub trait BinaryViewExt: BinaryViewBase { } } - fn read_buffer(&self, offset: u64, len: usize) -> Result { + fn read_buffer(&self, offset: u64, len: usize) -> Option { let read_buffer = unsafe { BNReadViewBuffer(self.as_ref().handle, offset, len) }; if read_buffer.is_null() { - Err(()) + None } else { - Ok(DataBuffer::from_raw(read_buffer)) + Some(DataBuffer::from_raw(read_buffer)) } } -- cgit v1.3.1