@@ -493,7 +493,6 @@ fn main() {
493
493
make_enum ( & codes, & mut file) ;
494
494
make_map ( & codes, & mut file) ;
495
495
make_impl ( & codes, & mut file) ;
496
- make_debug ( & codes, & mut file) ;
497
496
498
497
// This is already assumed to be the case but there's no way to say that
499
498
// you don't depend on anything at all
@@ -571,7 +570,7 @@ fn variant_name(code: &str) -> Option<String> {
571
570
fn make_enum ( codes : & [ Code ] , file : & mut BufWriter < File > ) {
572
571
write ! ( file,
573
572
r#"/// SQLSTATE error codes
574
- #[derive(PartialEq, Eq, Clone)]
573
+ #[derive(PartialEq, Eq, Clone, Debug )]
575
574
pub enum SqlState {{
576
575
"#
577
576
) . unwrap ( ) ;
@@ -631,26 +630,3 @@ impl SqlState {{
631
630
"#
632
631
) . unwrap ( ) ;
633
632
}
634
-
635
- fn make_debug ( codes : & [ Code ] , file : & mut BufWriter < File > ) {
636
- write ! ( file, r#"
637
- impl fmt::Debug for SqlState {{
638
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {{
639
- let s = match *self {{"#
640
- ) . unwrap ( ) ;
641
-
642
- for code in codes {
643
- write ! ( file, r#"
644
- SqlState::{0} => "{0}","# ,
645
- code. variant) . unwrap ( ) ;
646
- }
647
-
648
- write ! ( file, r#"
649
- SqlState::Other(ref s) => return write!(fmt, "Other({{:?}})", s),
650
- }};
651
- fmt.write_str(s)
652
- }}
653
- }}
654
- "#
655
- ) . unwrap ( ) ;
656
- }
0 commit comments