From 246f239d9f40f633160f0c18f87a20922d4e77bb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:06:37 +0200 Subject: Merging debian version 1.65.0+dfsg1-2. Signed-off-by: Daniel Baumann --- vendor/byte-tools/src/lib.rs | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 vendor/byte-tools/src/lib.rs (limited to 'vendor/byte-tools/src') diff --git a/vendor/byte-tools/src/lib.rs b/vendor/byte-tools/src/lib.rs deleted file mode 100644 index b4a450f9f..000000000 --- a/vendor/byte-tools/src/lib.rs +++ /dev/null @@ -1,29 +0,0 @@ -#![no_std] -use core::ptr; - -/// Copy bytes from `src` to `dst` -/// -/// Panics if `src.len() < dst.len()` -#[inline(always)] -pub fn copy(src: &[u8], dst: &mut [u8]) { - assert!(dst.len() >= src.len()); - unsafe { - ptr::copy_nonoverlapping(src.as_ptr(), dst.as_mut_ptr(), src.len()); - } -} - -/// Zero all bytes in `dst` -#[inline(always)] -pub fn zero(dst: &mut [u8]) { - unsafe { - ptr::write_bytes(dst.as_mut_ptr(), 0, dst.len()); - } -} - -/// Sets all bytes in `dst` equal to `value` -#[inline(always)] -pub fn set(dst: &mut [u8], value: u8) { - unsafe { - ptr::write_bytes(dst.as_mut_ptr(), value, dst.len()); - } -} -- cgit v1.2.3