blob: f5df87f9734cb473800303223aa77fc6493630f9 (
plain)
1
2
3
4
5
6
7
8
9
|
#[allow(clippy::cast_ptr_alignment)]
pub fn words_from_bytes(buf: &[u8]) -> &[u32] {
unsafe {
std::slice::from_raw_parts(
buf.as_ptr() as *const u32,
buf.len() / std::mem::size_of::<u32>(),
)
}
}
|