clean up equality code a bit
This commit is contained in:
parent
1e5c553b7c
commit
cae273abc0
1 changed files with 2 additions and 3 deletions
|
@ -42,9 +42,8 @@ pub struct TreeMap<K: Ord, V> {
|
|||
impl <K: Eq Ord, V: Eq> TreeMap<K, V>: Eq {
|
||||
pure fn eq(&self, other: &TreeMap<K, V>) -> bool {
|
||||
if self.len() != other.len() {
|
||||
return false
|
||||
}
|
||||
unsafe { // purity workaround
|
||||
false
|
||||
} else unsafe { // unsafe used as a purity workaround
|
||||
let mut x = self.iter();
|
||||
let mut y = other.iter();
|
||||
for self.len().times {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue