File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed
Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change 77use std:: fmt;
88
99#[ allow( clippy:: enum_variant_names) ]
10- #[ derive( Copy ) ]
10+ #[ derive( Copy , PartialEq , Eq ) ]
1111pub enum FormatWriter {
1212 IntWriter ( fn ( u64 ) -> String ) ,
1313 FloatWriter ( fn ( f64 ) -> String ) ,
@@ -21,21 +21,6 @@ impl Clone for FormatWriter {
2121 }
2222}
2323
24- impl PartialEq for FormatWriter {
25- fn eq ( & self , other : & Self ) -> bool {
26- use crate :: formatteriteminfo:: FormatWriter :: * ;
27-
28- match ( self , other) {
29- ( IntWriter ( a) , IntWriter ( b) ) => a == b,
30- ( FloatWriter ( a) , FloatWriter ( b) ) => a == b,
31- ( MultibyteWriter ( a) , MultibyteWriter ( b) ) => * a as usize == * b as usize ,
32- _ => false ,
33- }
34- }
35- }
36-
37- impl Eq for FormatWriter { }
38-
3924impl fmt:: Debug for FormatWriter {
4025 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
4126 match * self {
You can’t perform that action at this time.
0 commit comments