Resolve a huge portion of the clippy lints
This commit is contained in:
committed by
Jeremy Soller
parent
db8fb14614
commit
0931a7f49f
@@ -82,16 +82,10 @@ impl<T> WaitQueue<T> {
|
||||
|
||||
let (s1, s2) = inner.as_slices();
|
||||
let s1_bytes = unsafe {
|
||||
core::slice::from_raw_parts(
|
||||
s1.as_ptr().cast::<u8>(),
|
||||
s1.len() * core::mem::size_of::<T>(),
|
||||
)
|
||||
core::slice::from_raw_parts(s1.as_ptr().cast::<u8>(), core::mem::size_of_val(s1))
|
||||
};
|
||||
let s2_bytes = unsafe {
|
||||
core::slice::from_raw_parts(
|
||||
s2.as_ptr().cast::<u8>(),
|
||||
s2.len() * core::mem::size_of::<T>(),
|
||||
)
|
||||
core::slice::from_raw_parts(s2.as_ptr().cast::<u8>(), core::mem::size_of_val(s2))
|
||||
};
|
||||
|
||||
let mut bytes_copied = buf.copy_common_bytes_from_slice(s1_bytes)?;
|
||||
|
||||
Reference in New Issue
Block a user