File tree 11 files changed +4
-26
lines changed
11 files changed +4
-26
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,8 @@ pub struct PkgId {
37
37
}
38
38
39
39
impl Eq for PkgId {
40
- fn eq ( & self , p : & PkgId ) -> bool {
41
- p. path == self . path && p. version == self . version
42
- }
43
- fn ne ( & self , p : & PkgId ) -> bool {
44
- !( self . eq ( p) )
40
+ fn eq ( & self , other : & PkgId ) -> bool {
41
+ self . path == other. path && self . version == other. version
45
42
}
46
43
}
47
44
Original file line number Diff line number Diff line change @@ -40,9 +40,6 @@ impl Eq for Version {
40
40
_ => false
41
41
}
42
42
}
43
- fn ne ( & self , other : & Version ) -> bool {
44
- !self . eq ( other)
45
- }
46
43
}
47
44
48
45
impl Ord for Version {
Original file line number Diff line number Diff line change @@ -321,8 +321,6 @@ impl TotalOrd for bool {
321
321
impl Eq for bool {
322
322
#[ inline]
323
323
fn eq ( & self , other : & bool ) -> bool { ( * self ) == ( * other) }
324
- #[ inline]
325
- fn ne ( & self , other : & bool ) -> bool { ( * self ) != ( * other) }
326
324
}
327
325
328
326
#[ cfg( not( test) ) ]
Original file line number Diff line number Diff line change @@ -397,8 +397,6 @@ impl Char for char {
397
397
impl Eq for char {
398
398
#[ inline]
399
399
fn eq ( & self , other : & char ) -> bool { ( * self ) == ( * other) }
400
- #[ inline]
401
- fn ne ( & self , other : & char ) -> bool { ( * self ) != ( * other) }
402
400
}
403
401
404
402
#[ cfg( not( test) ) ]
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ and `Eq` to overload the `==` and `!=` operators.
36
36
#[ lang="eq" ]
37
37
pub trait Eq {
38
38
fn eq ( & self , other : & Self ) -> bool ;
39
+
40
+ #[ inline]
39
41
fn ne ( & self , other : & Self ) -> bool { !self . eq ( other) }
40
42
}
41
43
Original file line number Diff line number Diff line change @@ -171,8 +171,6 @@ impl Num for f32 {}
171
171
impl Eq for f32 {
172
172
#[ inline]
173
173
fn eq ( & self , other : & f32 ) -> bool { ( * self ) == ( * other) }
174
- #[ inline]
175
- fn ne ( & self , other : & f32 ) -> bool { ( * self ) != ( * other) }
176
174
}
177
175
178
176
#[ cfg( not( test) ) ]
Original file line number Diff line number Diff line change @@ -194,8 +194,6 @@ impl Num for f64 {}
194
194
impl Eq for f64 {
195
195
#[ inline]
196
196
fn eq ( & self , other : & f64 ) -> bool { ( * self ) == ( * other) }
197
- #[ inline]
198
- fn ne ( & self , other : & f64 ) -> bool { ( * self ) != ( * other) }
199
197
}
200
198
201
199
#[ cfg( not( test) ) ]
Original file line number Diff line number Diff line change @@ -331,8 +331,6 @@ impl Num for float {}
331
331
impl Eq for float {
332
332
#[ inline]
333
333
fn eq ( & self , other : & float ) -> bool { ( * self ) == ( * other) }
334
- #[ inline]
335
- fn ne ( & self , other : & float ) -> bool { ( * self ) != ( * other) }
336
334
}
337
335
338
336
#[ cfg( not( test) ) ]
Original file line number Diff line number Diff line change @@ -147,8 +147,6 @@ impl Ord for $T {
147
147
impl Eq for $T {
148
148
#[inline]
149
149
fn eq(&self, other: &$T) -> bool { return (*self) == (*other); }
150
- #[inline]
151
- fn ne(&self, other: &$T) -> bool { return (*self) != (*other); }
152
150
}
153
151
154
152
impl Orderable for $T {
Original file line number Diff line number Diff line change @@ -148,8 +148,6 @@ impl Ord for $T {
148
148
impl Eq for $T {
149
149
#[ inline]
150
150
fn eq( & self , other: & $T) -> bool { return ( * self ) == ( * other) ; }
151
- #[ inline]
152
- fn ne( & self , other: & $T) -> bool { return ( * self ) != ( * other) ; }
153
151
}
154
152
155
153
impl Orderable for $T {
Original file line number Diff line number Diff line change @@ -1180,17 +1180,13 @@ pub mod traits {
1180
1180
fn eq(&self, other: &~str) -> bool {
1181
1181
eq_slice((*self), (*other))
1182
1182
}
1183
- #[inline]
1184
- fn ne(&self, other: &~str) -> bool { !(*self).eq(other) }
1185
1183
}
1186
1184
1187
1185
impl Eq for @str {
1188
1186
#[inline]
1189
1187
fn eq(&self, other: &@str) -> bool {
1190
1188
eq_slice((*self), (*other))
1191
1189
}
1192
- #[inline]
1193
- fn ne(&self, other: &@str) -> bool { !(*self).eq(other) }
1194
1190
}
1195
1191
1196
1192
impl<'self> TotalEq for &'self str {
You can’t perform that action at this time.
0 commit comments