File tree Expand file tree Collapse file tree 11 files changed +4
-26
lines changed
Expand file tree Collapse file tree 11 files changed +4
-26
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,8 @@ pub struct PkgId {
3737}
3838
3939impl 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
4542 }
4643}
4744
Original file line number Diff line number Diff line change @@ -40,9 +40,6 @@ impl Eq for Version {
4040 _ => false
4141 }
4242 }
43- fn ne ( & self , other : & Version ) -> bool {
44- !self . eq ( other)
45- }
4643}
4744
4845impl Ord for Version {
Original file line number Diff line number Diff line change @@ -321,8 +321,6 @@ impl TotalOrd for bool {
321321impl Eq for bool {
322322 #[ inline]
323323 fn eq ( & self , other : & bool ) -> bool { ( * self ) == ( * other) }
324- #[ inline]
325- fn ne ( & self , other : & bool ) -> bool { ( * self ) != ( * other) }
326324}
327325
328326#[ cfg( not( test) ) ]
Original file line number Diff line number Diff line change @@ -397,8 +397,6 @@ impl Char for char {
397397impl Eq for char {
398398 #[ inline]
399399 fn eq ( & self , other : & char ) -> bool { ( * self ) == ( * other) }
400- #[ inline]
401- fn ne ( & self , other : & char ) -> bool { ( * self ) != ( * other) }
402400}
403401
404402#[ cfg( not( test) ) ]
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ and `Eq` to overload the `==` and `!=` operators.
3636#[ lang="eq" ]
3737pub trait Eq {
3838 fn eq ( & self , other : & Self ) -> bool ;
39+
40+ #[ inline]
3941 fn ne ( & self , other : & Self ) -> bool { !self . eq ( other) }
4042}
4143
Original file line number Diff line number Diff line change @@ -171,8 +171,6 @@ impl Num for f32 {}
171171impl Eq for f32 {
172172 #[ inline]
173173 fn eq ( & self , other : & f32 ) -> bool { ( * self ) == ( * other) }
174- #[ inline]
175- fn ne ( & self , other : & f32 ) -> bool { ( * self ) != ( * other) }
176174}
177175
178176#[ cfg( not( test) ) ]
Original file line number Diff line number Diff line change @@ -194,8 +194,6 @@ impl Num for f64 {}
194194impl Eq for f64 {
195195 #[ inline]
196196 fn eq ( & self , other : & f64 ) -> bool { ( * self ) == ( * other) }
197- #[ inline]
198- fn ne ( & self , other : & f64 ) -> bool { ( * self ) != ( * other) }
199197}
200198
201199#[ cfg( not( test) ) ]
Original file line number Diff line number Diff line change @@ -331,8 +331,6 @@ impl Num for float {}
331331impl Eq for float {
332332 #[ inline]
333333 fn eq ( & self , other : & float ) -> bool { ( * self ) == ( * other) }
334- #[ inline]
335- fn ne ( & self , other : & float ) -> bool { ( * self ) != ( * other) }
336334}
337335
338336#[ cfg( not( test) ) ]
Original file line number Diff line number Diff line change @@ -147,8 +147,6 @@ impl Ord for $T {
147147impl Eq for $T {
148148 #[inline]
149149 fn eq(&self, other: &$T) -> bool { return (*self) == (*other); }
150- #[inline]
151- fn ne(&self, other: &$T) -> bool { return (*self) != (*other); }
152150}
153151
154152impl Orderable for $T {
Original file line number Diff line number Diff line change @@ -148,8 +148,6 @@ impl Ord for $T {
148148impl Eq for $T {
149149 #[ inline]
150150 fn eq( & self , other: & $T) -> bool { return ( * self ) == ( * other) ; }
151- #[ inline]
152- fn ne( & self , other: & $T) -> bool { return ( * self ) != ( * other) ; }
153151}
154152
155153impl Orderable for $T {
You can’t perform that action at this time.
0 commit comments