@@ -27,29 +27,25 @@ pub enum ParseError {
2727impl std:: fmt:: Display for ParseError {
2828 fn fmt ( & self , f : & mut std:: fmt:: Formatter ) -> std:: fmt:: Result {
2929 match self {
30- ParseError :: InvalidUtf8 ( line, err) => {
31- write ! ( f, "bad unicode at line {}: {}" , line, err)
32- }
30+ ParseError :: InvalidUtf8 ( line, err) => write ! ( f, "bad unicode at line {line}: {err}" ) ,
3331 ParseError :: InvalidValue ( line) => write ! (
3432 f,
35- "directive at line {} is improperly formatted or contains invalid value" ,
36- line
33+ "directive at line {line} is improperly formatted or contains invalid value" ,
3734 ) ,
3835 ParseError :: InvalidOptionValue ( line) => write ! (
3936 f,
40- "directive options at line {} contains invalid value of some option" ,
41- line
37+ "directive options at line {line} contains invalid value of some option" ,
4238 ) ,
4339 ParseError :: InvalidOption ( line) => {
44- write ! ( f, "option at line {} is not recognized" , line )
40+ write ! ( f, "option at line {line } is not recognized" )
4541 }
4642 ParseError :: InvalidDirective ( line) => {
47- write ! ( f, "directive at line {} is not recognized" , line )
43+ write ! ( f, "directive at line {line } is not recognized" )
4844 }
4945 ParseError :: InvalidIp ( line, err) => {
50- write ! ( f, "directive at line {} contains invalid IP: {}" , line , err )
46+ write ! ( f, "directive at line {line } contains invalid IP: {err}" )
5147 }
52- ParseError :: ExtraData ( line) => write ! ( f, "extra data at the end of the line {}" , line ) ,
48+ ParseError :: ExtraData ( line) => write ! ( f, "extra data at the end of line {line}" ) ,
5349 }
5450 }
5551}
0 commit comments