Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenByteDev committed Jun 5, 2023
1 parent bf11989 commit 0be8dc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/process/memory/remote_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl RemoteBoxAllocator {
}
pub fn alloc_and_copy_buf<T: Copy>(&self, buf: &[T]) -> Result<RemoteAllocation, io::Error> {
let bytes = unsafe {
slice::from_raw_parts(buf.as_ptr() as *const u8, buf.len() * mem::size_of::<T>())
slice::from_raw_parts(buf.as_ptr() as *const u8, std::mem::size_of_val(buf))
};
let allocation = self.alloc_raw(bytes.len())?;
allocation.write_bytes(bytes)?;
Expand Down

0 comments on commit 0be8dc8

Please sign in to comment.