diff --git a/src/libstd/hashmap.rs b/src/libstd/hashmap.rs index 2d3e6431b0cd7..5654fa51a07c6 100644 --- a/src/libstd/hashmap.rs +++ b/src/libstd/hashmap.rs @@ -17,7 +17,7 @@ use container::{Container, Mutable, Map, MutableMap, Set, MutableSet}; use clone::Clone; -use cmp::{Eq, Equiv}; +use cmp::{Eq, Equiv, TotalEq}; use default::Default; use hash::Hash; use iter::{Iterator, FromIterator, Extendable}; @@ -513,6 +513,12 @@ impl Eq for HashMap { fn ne(&self, other: &HashMap) -> bool { !self.eq(other) } } +impl TotalEq for HashMap { + fn equals(&self, other: &HashMap) -> bool { + self == other + } +} + impl Clone for HashMap { fn clone(&self) -> HashMap { let mut new_map = HashMap::with_capacity(self.len());