array_bytes

Function slice2array_ref_unchecked

Source
pub fn slice2array_ref_unchecked<T, const N: usize>(slice: &[T]) -> &[T; N]
where T: Copy,
Expand description

Just like slice2array_ref but without the checking.

ยงExamples

assert_eq!(
	array_bytes::slice2array_ref_unchecked::<_, 8>(&[5, 2, 0, 1, 3, 1, 4, 0]),
	&[5, 2, 0, 1, 3, 1, 4, 0]
);