Skip to content

Commit 8f6ea3c

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/array/mod.rs

Lines changed: 1 addition & 1 deletion
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)