Skip to content

Commit ac083c6

Browse files
rhysdcamelid
andauthored
Reborrow mut slice instead of converting it with as_ref
Co-authored-by: Noah Lev <[email protected]>
1 parent 66e0523 commit ac083c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/array/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ where
184184
type Error = TryFromSliceError;
185185

186186
fn try_from(slice: &mut [T]) -> Result<[T; N], TryFromSliceError> {
187-
<Self>::try_from(slice.as_ref())
187+
<Self>::try_from(&*slice)
188188
}
189189
}
190190

0 commit comments

Comments
 (0)