Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
parthchandra committed Jul 26, 2024
1 parent d1a6e24 commit f63f5f6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions native/core/src/common/bit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,7 @@ pub fn memcpy(source: &[u8], target: &mut [u8]) {
debug_assert!(target.len() >= source.len(), "Copying from source to target is not possible. Source has {} bytes but target has {} bytes", source.len(), target.len());
// Originally `target[..source.len()].copy_from_slice(source)`
// We use the unsafe copy method to avoid some expensive bounds checking/
unsafe {
std::ptr::copy_nonoverlapping(
source.as_ptr(),
target.as_mut_ptr(),
source.len())
}
unsafe { std::ptr::copy_nonoverlapping(source.as_ptr(), target.as_mut_ptr(), source.len()) }
}

#[inline]
Expand Down

0 comments on commit f63f5f6

Please sign in to comment.