Rollup merge of #117549 - DaniPopes:more-copied, r=b-naber

Use `copied` instead of manual `map`
This commit is contained in:
Matthias Krüger
2023-11-17 23:04:22 +01:00
committed by GitHub
8 changed files with 10 additions and 11 deletions

View File

@@ -206,7 +206,7 @@ where
#[inline]
fn try_from(slice: &[T]) -> Result<[T; N], TryFromSliceError> {
<&Self>::try_from(slice).map(|r| *r)
<&Self>::try_from(slice).copied()
}
}