Skip to content

Commit

Permalink
umbra_slice: Address clippy lint about transmute
Browse files Browse the repository at this point in the history
Recent Clippy versions want the left and right hand sides written
explicitly.
  • Loading branch information
the-mikedavis committed Nov 14, 2024
1 parent dfb9e07 commit c35504f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/umbra_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ impl<T: Copy, const PREFIX_LEN: usize, const SUFFIX_LEN: usize> TryFrom<&[T]>
// unstable function (`MaybeUninit::slice_assume_init_mut`).
fn copy_to_slice<U: Copy>(this: &mut [MaybeUninit<U>], src: &[U]) {
// SAFETY: &[U] and &[MaybeUninit<U>] have the same layout.
let uninit_src: &[MaybeUninit<U>] = unsafe { mem::transmute(src) };
let uninit_src = unsafe { mem::transmute::<&[U], &[MaybeUninit<U>]>(src) };
this.copy_from_slice(uninit_src);
}

Expand Down

0 comments on commit c35504f

Please sign in to comment.