@@ -65,25 +65,6 @@ struct Package {
6565}
6666
6767impl Package : cmp:: Ord {
68- #[ cfg( stage0) ]
69- pure fn lt ( other : & Package ) -> bool {
70- if self . name . lt ( & ( * other) . name ) { return true ; }
71- if ( * other) . name . lt ( & self . name ) { return false ; }
72- if self . uuid . lt ( & ( * other) . uuid ) { return true ; }
73- if ( * other) . uuid . lt ( & self . uuid ) { return false ; }
74- if self . url . lt ( & ( * other) . url ) { return true ; }
75- if ( * other) . url . lt ( & self . url ) { return false ; }
76- if self . method . lt ( & ( * other) . method ) { return true ; }
77- if ( * other) . method . lt ( & self . method ) { return false ; }
78- if self . description . lt ( & ( * other) . description ) { return true ; }
79- if ( * other) . description . lt ( & self . description ) { return false ; }
80- if self . tags . lt ( & ( * other) . tags ) { return true ; }
81- if ( * other) . tags . lt ( & self . tags ) { return false ; }
82- if self . versions . lt ( & ( * other) . versions ) { return true ; }
83- return false ;
84- }
85- #[ cfg( stage1) ]
86- #[ cfg( stage2) ]
8768 pure fn lt ( & self , other : & Package ) -> bool {
8869 if ( * self ) . name . lt ( & ( * other) . name ) { return true ; }
8970 if ( * other) . name . lt ( & ( * self ) . name ) { return false ; }
@@ -100,20 +81,8 @@ impl Package : cmp::Ord {
10081 if ( * self ) . versions . lt ( & ( * other) . versions ) { return true ; }
10182 return false ;
10283 }
103- #[ cfg( stage0) ]
104- pure fn le ( other : & Package ) -> bool { !( * other) . lt ( & self ) }
105- #[ cfg( stage1) ]
106- #[ cfg( stage2) ]
10784 pure fn le ( & self , other : & Package ) -> bool { !( * other) . lt ( & ( * self ) ) }
108- #[ cfg( stage0) ]
109- pure fn ge ( other : & Package ) -> bool { !self . lt ( other) }
110- #[ cfg( stage1) ]
111- #[ cfg( stage2) ]
11285 pure fn ge ( & self , other : & Package ) -> bool { !( * self ) . lt ( other) }
113- #[ cfg( stage0) ]
114- pure fn gt ( other : & Package ) -> bool { ( * other) . lt ( & self ) }
115- #[ cfg( stage1) ]
116- #[ cfg( stage2) ]
11786 pure fn gt ( & self , other : & Package ) -> bool { ( * other) . lt ( & ( * self ) ) }
11887}
11988
@@ -160,19 +129,9 @@ struct Options {
160129enum Mode { SystemMode , UserMode , LocalMode }
161130
162131impl Mode : cmp:: Eq {
163- #[ cfg( stage0) ]
164- pure fn eq ( other : & Mode ) -> bool {
165- ( self as uint ) == ( ( * other) as uint )
166- }
167- #[ cfg( stage1) ]
168- #[ cfg( stage2) ]
169132 pure fn eq ( & self , other : & Mode ) -> bool {
170133 ( ( * self ) as uint ) == ( ( * other) as uint )
171134 }
172- #[ cfg( stage0) ]
173- pure fn ne ( other : & Mode ) -> bool { !self . eq ( other) }
174- #[ cfg( stage1) ]
175- #[ cfg( stage2) ]
176135 pure fn ne ( & self , other : & Mode ) -> bool { !( * self ) . eq ( other) }
177136}
178137
0 commit comments