@@ -302,29 +302,29 @@ impl Display for InvalidMd {
302302 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> std:: fmt:: Result {
303303 match self {
304304 InvalidMd :: Unsupported ( node) => {
305- write ! ( f, "unsupported node: {:?}" , node )
305+ write ! ( f, "unsupported node: {node :?}" )
306306 }
307307 InvalidMd :: NonListItemDirectlyUnderList ( node) => {
308- write ! ( f, "expected a list item, but found: {:?}" , node )
308+ write ! ( f, "expected a list item, but found: {node :?}" )
309309 }
310310 InvalidMd :: NonRowDirectlyUnderTable ( node) => {
311- write ! ( f, "expected a row, but found: {:?}" , node )
311+ write ! ( f, "expected a row, but found: {node :?}" )
312312 }
313313 InvalidMd :: NonInlineWhereInlineExpected ( node) => {
314- write ! ( f, "expected an inline element, but found: {:?}" , node )
314+ write ! ( f, "expected an inline element, but found: {node :?}" )
315315 }
316316 InvalidMd :: MissingReferenceDefinition ( id) => {
317- write ! ( f, "couldn't find definition for link/image/footnote: {}" , id )
317+ write ! ( f, "couldn't find definition for link/image/footnote: {id}" )
318318 }
319319 InvalidMd :: ConflictingReferenceDefinition ( id) => {
320- write ! ( f, "found multiple definitions for link/image/footnote: {}" , id )
320+ write ! ( f, "found multiple definitions for link/image/footnote: {id}" )
321321 }
322322 InvalidMd :: InternalError ( err) => {
323323 f. write_str ( "internal error\n " ) ?;
324324 std:: fmt:: Display :: fmt ( & err. backtrace , f)
325325 }
326326 InvalidMd :: UnknownMarkdown ( description) => {
327- write ! ( f, "encountered unknown markdown: {}\n \n " , description ) ?;
327+ write ! ( f, "encountered unknown markdown: {description }\n \n " ) ?;
328328 f. write_str ( "* Please consider reporting this at https://github.com/yshavit/mdq/issues\n " ) ?;
329329 f. write_str ( "* You can suppress this error by using --allow-unknown-markdown." )
330330 }
@@ -1948,7 +1948,7 @@ impl<'a> Lookups<'a> {
19481948 }
19491949
19501950 fn build_lookups ( & mut self , node : & mdast:: Node , read_opts : & ReadOptions ) -> Result < ( ) , InvalidMd > {
1951- let x = format ! ( "{:?}" , node ) ;
1951+ let x = format ! ( "{node :?}" ) ;
19521952 let _ = x;
19531953 match node {
19541954 mdast:: Node :: FootnoteDefinition ( def) => {
@@ -3426,13 +3426,13 @@ mod tests {
34263426 {
34273427 match result {
34283428 Ok ( lookups) => check ( lookups) ,
3429- Err ( err) => panic ! ( "expected good Lookups, but got: {:?}" , err ) ,
3429+ Err ( err) => panic ! ( "expected good Lookups, but got: {err :?}" ) ,
34303430 }
34313431 }
34323432
34333433 fn expect_absent ( result : Result < Lookups < ' static > , InvalidMd > , expect : InvalidMd ) {
34343434 match result {
3435- Ok ( _) => panic ! ( "expected {:?}, but got good Lookups" , expect ) ,
3435+ Ok ( _) => panic ! ( "expected {expect :?}, but got good Lookups" ) ,
34363436 Err ( err) => assert_eq ! ( err, expect) ,
34373437 }
34383438 }
@@ -3870,14 +3870,14 @@ mod tests {
38703870 _ => ( "" , "" ) ,
38713871 } ;
38723872 if !tag. is_empty ( ) {
3873- out. push_str ( & format ! ( "<{}>" , tag ) )
3873+ out. push_str ( & format ! ( "<{tag }>" ) )
38743874 }
38753875 out. push_str ( text) ;
38763876 if let Some ( children) = node. children ( ) {
38773877 children. iter ( ) . for_each ( |c| build ( out, c) ) ;
38783878 }
38793879 if !tag. is_empty ( ) {
3880- out. push_str ( & format ! ( "</{}>" , tag ) )
3880+ out. push_str ( & format ! ( "</{tag }>" ) )
38813881 }
38823882 }
38833883 let mut s = String :: with_capacity ( 32 ) ;
0 commit comments