about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/sso/map.rs
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-10-26 21:02:48 -0400
committerJoshua Nelson <jyn514@gmail.com>2020-10-30 10:13:39 -0400
commit57c6ed0c07aaea9c89a192e54b3274464ebe6fbf (patch)
tree98a2c0310690cf0c09851cb5a12a99264bbbf522 /compiler/rustc_data_structures/src/sso/map.rs
parentbfecb18771aa0249efe05dd7c35fa232f180bb70 (diff)
downloadrust-57c6ed0c07aaea9c89a192e54b3274464ebe6fbf.tar.gz
rust-57c6ed0c07aaea9c89a192e54b3274464ebe6fbf.zip
Fix even more clippy warnings
Diffstat (limited to 'compiler/rustc_data_structures/src/sso/map.rs')
-rw-r--r--compiler/rustc_data_structures/src/sso/map.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_data_structures/src/sso/map.rs b/compiler/rustc_data_structures/src/sso/map.rs
index fa510e58314..fe8ae7abf98 100644
--- a/compiler/rustc_data_structures/src/sso/map.rs
+++ b/compiler/rustc_data_structures/src/sso/map.rs
@@ -395,7 +395,7 @@ where
     V: Copy,
 {
     fn extend<T: IntoIterator<Item = (&'a K, &'a V)>>(&mut self, iter: T) {
-        self.extend(iter.into_iter().map(|(k, v)| (k.clone(), v.clone())))
+        self.extend(iter.into_iter().map(|(k, v)| (*k, *v)))
     }
 
     #[inline]
@@ -451,7 +451,7 @@ impl<'a, K, V> IntoIterator for &'a SsoHashMap<K, V> {
     fn into_iter(self) -> Self::IntoIter {
         match self {
             SsoHashMap::Array(array) => EitherIter::Left(array.into_iter().map(adapt_array_ref_it)),
-            SsoHashMap::Map(map) => EitherIter::Right(map.into_iter()),
+            SsoHashMap::Map(map) => EitherIter::Right(map.iter()),
         }
     }
 }
@@ -469,7 +469,7 @@ impl<'a, K, V> IntoIterator for &'a mut SsoHashMap<K, V> {
     fn into_iter(self) -> Self::IntoIter {
         match self {
             SsoHashMap::Array(array) => EitherIter::Left(array.into_iter().map(adapt_array_mut_it)),
-            SsoHashMap::Map(map) => EitherIter::Right(map.into_iter()),
+            SsoHashMap::Map(map) => EitherIter::Right(map.iter_mut()),
         }
     }
 }