diff --git a/src/maps/hash_map.rs b/src/maps/hash_map.rs index ad289839..8f05ec43 100644 --- a/src/maps/hash_map.rs +++ b/src/maps/hash_map.rs @@ -98,13 +98,13 @@ impl<'a, K: Pod, V: Pod> TryFrom<&'a mut Map> for HashMap<&'a mut Map, K, V> { } } -pub struct MapKeys<'coll, T: AsRef, K: Clone + Pod, V: Clone + Pod> { +pub struct MapKeys<'coll, T: AsRef, K: Pod, V: Pod> { map: &'coll HashMap, err: bool, key: Option, } -impl<'coll, T: AsRef, K: Clone + Pod, V: Clone + Pod> MapKeys<'coll, T, K, V> { +impl<'coll, T: AsRef, K: Pod, V: Pod> MapKeys<'coll, T, K, V> { fn new(map: &'coll HashMap) -> MapKeys<'coll, T, K, V> { MapKeys { map, @@ -114,7 +114,7 @@ impl<'coll, T: AsRef, K: Clone + Pod, V: Clone + Pod> MapKeys<'coll, T, K, } } -impl, K: Clone + Pod, V: Clone + Pod> Iterator for MapKeys<'_, T, K, V> { +impl, K: Pod, V: Pod> Iterator for MapKeys<'_, T, K, V> { type Item = Result; fn next(&mut self) -> Option> { @@ -147,11 +147,11 @@ impl, K: Clone + Pod, V: Clone + Pod> Iterator for MapKeys<'_, T, } } -pub struct MapIter<'coll, T: AsRef, K: Clone + Pod, V: Clone + Pod> { +pub struct MapIter<'coll, T: AsRef, K: Pod, V: Pod> { inner: MapKeys<'coll, T, K, V>, } -impl<'coll, T: AsRef, K: Clone + Pod, V: Clone + Pod> MapIter<'coll, T, K, V> { +impl<'coll, T: AsRef, K: Pod, V: Pod> MapIter<'coll, T, K, V> { fn new(map: &'coll HashMap) -> MapIter<'coll, T, K, V> { MapIter { inner: MapKeys::new(map), @@ -159,7 +159,7 @@ impl<'coll, T: AsRef, K: Clone + Pod, V: Clone + Pod> MapIter<'coll, T, K, } } -impl, K: Clone + Pod, V: Clone + Pod> Iterator for MapIter<'_, T, K, V> { +impl, K: Pod, V: Pod> Iterator for MapIter<'_, T, K, V> { type Item = Result<(K, V), MapError>; fn next(&mut self) -> Option {