about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/core/src/array/mod.rs2
-rw-r--r--library/core/src/iter/adapters/copied.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs
index ebd4a8c05fe..4c48b199f0f 100644
--- a/library/core/src/array/mod.rs
+++ b/library/core/src/array/mod.rs
@@ -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()
     }
 }
 
diff --git a/library/core/src/iter/adapters/copied.rs b/library/core/src/iter/adapters/copied.rs
index 8f6b2904eae..7a2c9d839b7 100644
--- a/library/core/src/iter/adapters/copied.rs
+++ b/library/core/src/iter/adapters/copied.rs
@@ -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())
     }
 }