From 23b4b72a5559ceba5cd72b880847129557123349 Mon Sep 17 00:00:00 2001 From: Maneren <49210777+Maneren@users.noreply.github.com> Date: Sun, 4 Feb 2024 15:01:41 +0100 Subject: [PATCH] Relax needless bounds (#21) Co-authored-by: Mitchell Berendhuysen --- src/default_btree.rs | 12 ++++++------ src/default_hashmap.rs | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/default_btree.rs b/src/default_btree.rs index 243985a..5eec323 100644 --- a/src/default_btree.rs +++ b/src/default_btree.rs @@ -739,7 +739,7 @@ where impl<'a, K, V> IntoIterator for &'a DefaultBTreeMap where - K: Eq + Ord + Clone, + K: Eq + Ord, V: Default, { type Item = (&'a K, &'a V); @@ -752,7 +752,7 @@ where impl Index<&K> for DefaultBTreeMap where - K: Eq + Ord + Clone, + K: Eq + Ord, V: Default, { type Output = V; @@ -764,7 +764,7 @@ where impl<'a, K, V> IntoIterator for &'a mut DefaultBTreeMap where - K: Eq + Ord + Clone, + K: Eq + Ord, V: Default, { type Item = (&'a K, &'a mut V); @@ -777,7 +777,7 @@ where impl From> for DefaultBTreeMap where - K: Eq + Ord + Clone, + K: Eq + Ord, V: Default, { fn from(btree: BTreeMap) -> Self { @@ -790,7 +790,7 @@ where impl From> for BTreeMap where - K: Eq + Ord + Clone, + K: Eq + Ord, V: Default, { fn from(btree: DefaultBTreeMap) -> Self { @@ -800,7 +800,7 @@ where impl Iterator for DefaultBTreeMapIter where - K: Eq + Ord + Clone, + K: Eq + Ord, V: Default, { type Item = (K, V); diff --git a/src/default_hashmap.rs b/src/default_hashmap.rs index be452ff..4024e6e 100644 --- a/src/default_hashmap.rs +++ b/src/default_hashmap.rs @@ -575,7 +575,7 @@ where impl IntoIterator for DefaultHashMap where - K: Eq + Hash + Ord + Clone, + K: Eq + Hash + Clone, V: Default, S: BuildHasher, { @@ -597,7 +597,7 @@ where impl<'a, K, V, S> IntoIterator for &'a DefaultHashMap where - K: Eq + Hash + Ord + Clone, + K: Eq + Hash, V: Default, S: BuildHasher, { @@ -611,7 +611,7 @@ where impl Index<&K> for DefaultHashMap where - K: Eq + Hash + Ord + Clone, + K: Eq + Hash, V: Default, S: BuildHasher, { @@ -624,7 +624,7 @@ where impl<'a, K, V, S> IntoIterator for &'a mut DefaultHashMap where - K: Eq + Hash + Ord + Clone, + K: Eq + Hash, V: Default, S: BuildHasher, { @@ -638,7 +638,7 @@ where impl From> for DefaultHashMap where - K: Eq + Hash + Ord + Clone, + K: Eq + Hash, V: Default, S: BuildHasher, { @@ -652,7 +652,7 @@ where impl From> for HashMap where - K: Eq + Hash + Ord + Clone, + K: Eq + Hash, V: Default, S: BuildHasher, { @@ -663,7 +663,7 @@ where impl Iterator for DefaultHashMapIter where - K: Eq + Hash + Ord + Clone, + K: Eq + Hash, V: Default, S: BuildHasher, { @@ -682,7 +682,7 @@ where pub struct DefaultHashMapIter where - K: Eq + Hash + Ord, + K: Eq + Hash, V: Default, S: BuildHasher, {