@@ -149,9 +149,9 @@ impl<K: TotalOrd, V> Map<K, V> for TreeMap<K, V> {
149
149
match * current {
150
150
Some ( ref r) => {
151
151
match key. cmp ( & r. key ) {
152
- Less => current = & r. left ,
153
- Greater => current = & r. right ,
154
- Equal => return Some ( & r. value )
152
+ Less => current = & r. left ,
153
+ Greater => current = & r. right ,
154
+ Equal => return Some ( & r. value )
155
155
}
156
156
}
157
157
None => return None
@@ -532,15 +532,15 @@ pub impl<K: TotalOrd, V> TreeNode<K, V> {
532
532
}
533
533
534
534
pure fn each<K : TotalOrd , V >( node: & r/Option <~TreeNode <K , V >>,
535
- f: & fn ( & ( & r/K , & r/V ) ) -> bool ) {
535
+ f: & fn ( & ( & r/K , & r/V ) ) -> bool ) {
536
536
for node. each |x| {
537
537
each( & x. left, f) ;
538
538
if f( & ( & x. key, & x. value) ) { each( & x. right, f) }
539
539
}
540
540
}
541
541
542
542
pure fn each_reverse<K : TotalOrd , V >( node: & r/Option <~TreeNode <K , V >>,
543
- f: & fn ( & ( & r/K , & r/V ) ) -> bool ) {
543
+ f: & fn ( & ( & r/K , & r/V ) ) -> bool ) {
544
544
for node. each |x| {
545
545
each_reverse( & x. right, f) ;
546
546
if f( & ( & x. key, & x. value) ) { each_reverse( & x. left, f) }
@@ -665,20 +665,20 @@ fn remove<K: TotalOrd, V>(node: &mut Option<~TreeNode<K, V>>,
665
665
skew( save) ;
666
666
667
667
match save. right {
668
- Some ( ref mut right) => {
669
- skew( right) ;
670
- match right. right {
671
- Some ( ref mut x) => { skew( x) } ,
672
- None => ( )
673
- }
668
+ Some ( ref mut right) => {
669
+ skew( right) ;
670
+ match right. right {
671
+ Some ( ref mut x) => { skew( x) } ,
672
+ None => ( )
674
673
}
675
- None => ( )
674
+ }
675
+ None => ( )
676
676
}
677
677
678
678
split( save) ;
679
679
match save. right {
680
- Some ( ref mut x) => { split( x) } ,
681
- None => ( )
680
+ Some ( ref mut x) => { split( x) } ,
681
+ None => ( )
682
682
}
683
683
}
684
684
0 commit comments