@@ -65,25 +65,6 @@ struct Package {
65
65
}
66
66
67
67
impl 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) ]
87
68
pure fn lt ( & self , other : & Package ) -> bool {
88
69
if ( * self ) . name . lt ( & ( * other) . name ) { return true ; }
89
70
if ( * other) . name . lt ( & ( * self ) . name ) { return false ; }
@@ -100,20 +81,8 @@ impl Package : cmp::Ord {
100
81
if ( * self ) . versions . lt ( & ( * other) . versions ) { return true ; }
101
82
return false ;
102
83
}
103
- #[ cfg( stage0) ]
104
- pure fn le ( other : & Package ) -> bool { !( * other) . lt ( & self ) }
105
- #[ cfg( stage1) ]
106
- #[ cfg( stage2) ]
107
84
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) ]
112
85
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) ]
117
86
pure fn gt ( & self , other : & Package ) -> bool { ( * other) . lt ( & ( * self ) ) }
118
87
}
119
88
@@ -160,19 +129,9 @@ struct Options {
160
129
enum Mode { SystemMode , UserMode , LocalMode }
161
130
162
131
impl 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) ]
169
132
pure fn eq ( & self , other : & Mode ) -> bool {
170
133
( ( * self ) as uint ) == ( ( * other) as uint )
171
134
}
172
- #[ cfg( stage0) ]
173
- pure fn ne ( other : & Mode ) -> bool { !self . eq ( other) }
174
- #[ cfg( stage1) ]
175
- #[ cfg( stage2) ]
176
135
pure fn ne ( & self , other : & Mode ) -> bool { !( * self ) . eq ( other) }
177
136
}
178
137
0 commit comments