File tree 2 files changed +5
-4
lines changed 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -91,8 +91,8 @@ simple_enum_error! {
91
91
}
92
92
93
93
impl fmt:: Display for ParseError {
94
- fn fmt ( & self , fmt : & mut Formatter ) -> fmt:: Result {
95
- self . description ( ) . fmt ( fmt )
94
+ fn fmt ( & self , f : & mut Formatter ) -> fmt:: Result {
95
+ fmt :: Display :: fmt ( self . description ( ) , f )
96
96
}
97
97
}
98
98
@@ -151,8 +151,8 @@ syntax_violation_enum! {
151
151
}
152
152
153
153
impl fmt:: Display for SyntaxViolation {
154
- fn fmt ( & self , fmt : & mut Formatter ) -> fmt:: Result {
155
- self . description ( ) . fmt ( fmt )
154
+ fn fmt ( & self , f : & mut Formatter ) -> fmt:: Result {
155
+ fmt :: Display :: fmt ( self . description ( ) , f )
156
156
}
157
157
}
158
158
Original file line number Diff line number Diff line change @@ -512,6 +512,7 @@ fn test_syntax_violation_callback() {
512
512
let v = violation. take ( ) . unwrap ( ) ;
513
513
assert_eq ! ( v, ExpectedDoubleSlash ) ;
514
514
assert_eq ! ( v. description( ) , "expected //" ) ;
515
+ assert_eq ! ( v. to_string( ) , "expected //" ) ;
515
516
}
516
517
517
518
#[ test]
You can’t perform that action at this time.
0 commit comments