File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -91,8 +91,8 @@ simple_enum_error! {
9191}
9292
9393impl 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 )
9696 }
9797}
9898
@@ -151,8 +151,8 @@ syntax_violation_enum! {
151151}
152152
153153impl 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 )
156156 }
157157}
158158
Original file line number Diff line number Diff line change @@ -512,6 +512,7 @@ fn test_syntax_violation_callback() {
512512 let v = violation. take ( ) . unwrap ( ) ;
513513 assert_eq ! ( v, ExpectedDoubleSlash ) ;
514514 assert_eq ! ( v. description( ) , "expected //" ) ;
515+ assert_eq ! ( v. to_string( ) , "expected //" ) ;
515516}
516517
517518#[ test]
You can’t perform that action at this time.
0 commit comments