File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ enum N {
3535impl PartialEq for N {
3636 fn eq ( & self , other : & Self ) -> bool {
3737 match ( self , other) {
38- ( Self :: PosInt ( a) , Self :: PosInt ( b) ) => a == b,
39- ( Self :: NegInt ( a) , Self :: NegInt ( b) ) => a == b,
40- ( Self :: Float ( a) , Self :: Float ( b) ) => a == b,
38+ ( N :: PosInt ( a) , N :: PosInt ( b) ) => a == b,
39+ ( N :: NegInt ( a) , N :: NegInt ( b) ) => a == b,
40+ ( N :: Float ( a) , N :: Float ( b) ) => a == b,
4141 _ => false ,
4242 }
4343 }
@@ -51,11 +51,11 @@ impl Eq for N {}
5151impl core:: hash:: Hash for N {
5252 fn hash < H : core:: hash:: Hasher > ( & self , h : & mut H ) {
5353 match self {
54- Self :: PosInt ( i) => i. hash ( h) ,
55- Self :: NegInt ( i) => i. hash ( h) ,
56- Self :: Float ( f) => {
54+ N :: PosInt ( i) => i. hash ( h) ,
55+ N :: NegInt ( i) => i. hash ( h) ,
56+ N :: Float ( f) => {
5757 // Using `f64::to_bits` here is fine since any float values are always finite.
58- f. to_bits ( ) . hash ( h)
58+ f. to_bits ( ) . hash ( h) ;
5959 }
6060 }
6161 }
You can’t perform that action at this time.
0 commit comments