Skip to content

Commit

Permalink
fix: make things compile on aarch64 again
Browse files Browse the repository at this point in the history
Make things mutable and also silence a Clippy warning.
  • Loading branch information
vmx committed Jan 13, 2025
1 parent beb7bd9 commit debe99f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fr32/src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ impl<R: Read> Fr32Reader<R> {
// Safety: This is safe because the struct/data is aligned on
// a 16 byte boundary and can therefore be casted from u128
// to u8 without alignment safety issues.
#[allow(clippy::cast_slice_different_sizes)]
unsafe {
&mut (*(&self.in_buffer.0 as *const [u8] as *mut [u128]))
&mut (*(&mut self.in_buffer.0 as *const [u8] as *mut [u128]))
}
#[cfg(not(target_arch = "aarch64"))]
self.in_buffer.0.as_slice_of::<u128>().unwrap()
Expand Down

0 comments on commit debe99f

Please sign in to comment.