We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
copied
map
1 parent 6dcc3b4 commit e07b588Copy full SHA for e07b588
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
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