mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 02:43:24 +00:00
Fix clippy and compiler warings
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
20a90426a0
commit
9ca64c281e
@ -250,8 +250,7 @@ impl Rhsa {
|
||||
pub unsafe fn from_bytes(bytes: &[u8]) -> Self {
|
||||
let length = u16_from_slice(&bytes[2..4]) as u32;
|
||||
debug_assert_eq!(length, bytes.len() as u32);
|
||||
let result = *(bytes.as_ptr() as *const Self);
|
||||
result
|
||||
*(bytes.as_ptr() as *const Self)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user