Reborrow mut slice instead of converting it with as_ref

Co-authored-by: Noah Lev <camelidcamel@gmail.com>
This commit is contained in:
Linda_pp
2021-11-21 11:01:31 +09:00
committed by GitHub
parent 66e0523d09
commit ac083c6b45

View File

@@ -184,7 +184,7 @@ where
type Error = TryFromSliceError;
fn try_from(slice: &mut [T]) -> Result<[T; N], TryFromSliceError> {
<Self>::try_from(slice.as_ref())
<Self>::try_from(&*slice)
}
}