library: use copied
instead of manual map
This commit is contained in:
parent
a026bd49e1
commit
e6779d98ee
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ where
|
||||
T: Copy,
|
||||
{
|
||||
default fn spec_next_chunk(&mut self) -> Result<[T; N], array::IntoIter<T, N>> {
|
||||
array::iter_next_chunk(&mut self.map(|e| *e))
|
||||
array::iter_next_chunk(&mut self.copied())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user