diff --git a/src/collections/hash_map/extend.rs b/src/collections/hash_map/extend.rs index d7ca2b94..c34bb9ed 100644 --- a/src/collections/hash_map/extend.rs +++ b/src/collections/hash_map/extend.rs @@ -24,9 +24,9 @@ where // the map will only resize twice in the worst case. let additional = if self.is_empty() { - stream.size_hint().0 + stream.size_hint().0 } else { - (stream.size_hint().0 + 1) / 2 + (stream.size_hint().0 + 1) / 2 }; self.reserve(additional); diff --git a/src/collections/hash_set/extend.rs b/src/collections/hash_set/extend.rs index e10cb3c6..123e844e 100644 --- a/src/collections/hash_set/extend.rs +++ b/src/collections/hash_set/extend.rs @@ -27,9 +27,9 @@ where // the map will only resize twice in the worst case. let additional = if self.is_empty() { - stream.size_hint().0 + stream.size_hint().0 } else { - (stream.size_hint().0 + 1) / 2 + (stream.size_hint().0 + 1) / 2 }; self.reserve(additional);