mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
rust 1.71 clippy fixes
This commit is contained in:
parent
d3ccdb51ea
commit
8e9cf121ad
9 changed files with 13 additions and 14 deletions
|
@ -194,7 +194,7 @@ where
|
|||
|
||||
unsafe fn slice_as_bytes<T>(slice: &[T]) -> &[u8] {
|
||||
let ptr = slice.as_ptr();
|
||||
let byte_length = std::mem::size_of::<T>() * slice.len();
|
||||
let byte_length = std::mem::size_of_val(slice);
|
||||
|
||||
std::slice::from_raw_parts(ptr as *const u8, byte_length)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue