Skip to content

Commit 522fdbe

Browse files
committed
Use Iterator::eq and (dogfood) eq_by in compiler and library
1 parent 3c6ae45 commit 522fdbe

File tree

1 file changed

+1
-1
lines changed
  • alloc/src/collections/btree

1 file changed

+1
-1
lines changed

alloc/src/collections/btree/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2413,7 +2413,7 @@ impl<K, V> Default for BTreeMap<K, V> {
24132413
#[stable(feature = "rust1", since = "1.0.0")]
24142414
impl<K: PartialEq, V: PartialEq, A: Allocator + Clone> PartialEq for BTreeMap<K, V, A> {
24152415
fn eq(&self, other: &BTreeMap<K, V, A>) -> bool {
2416-
self.len() == other.len() && self.iter().zip(other).all(|(a, b)| a == b)
2416+
self.iter().eq(other)
24172417
}
24182418
}
24192419

0 commit comments

Comments
 (0)