We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
copied
map
1 parent a026bd4 commit e6779d9Copy full SHA for e6779d9
library/core/src/array/mod.rs
@@ -206,7 +206,7 @@ where
206
207
#[inline]
208
fn try_from(slice: &[T]) -> Result<[T; N], TryFromSliceError> {
209
- <&Self>::try_from(slice).map(|r| *r)
+ <&Self>::try_from(slice).copied()
210
}
211
212
library/core/src/iter/adapters/copied.rs
@@ -193,7 +193,7 @@ where
193
T: Copy,
194
{
195
default fn spec_next_chunk(&mut self) -> Result<[T; N], array::IntoIter<T, N>> {
196
- array::iter_next_chunk(&mut self.map(|e| *e))
+ array::iter_next_chunk(&mut self.copied())
197
198
199
0 commit comments