@@ -84,8 +84,8 @@ impl Lint {
8484 for & expected in & [ "### Example" , "### Explanation" , "{{produces}}" ] {
8585 if expected == "{{produces}}" && self . is_ignored ( ) {
8686 if self . doc_contains ( "{{produces}}" ) {
87- return Err ( format ! (
88- "the lint example has `ignore`, but also contains the {{{{ produces}} }} marker\n \
87+ return Err (
88+ "the lint example has `ignore`, but also contains the {{produces}} marker\n \
8989 \n \
9090 The documentation generator cannot generate the example output when the \
9191 example is ignored.\n \
@@ -111,7 +111,7 @@ impl Lint {
111111 Replacing the output with the text of the example you \
112112 compiled manually yourself.\n \
113113 "
114- ) . into ( ) ) ;
114+ . into ( ) ) ;
115115 }
116116 continue ;
117117 }
@@ -519,11 +519,11 @@ impl<'a> LintExtractor<'a> {
519519 let mut these_lints: Vec < _ > = lints. iter ( ) . filter ( |lint| lint. level == level) . collect ( ) ;
520520 these_lints. sort_unstable_by_key ( |lint| & lint. name ) ;
521521 for lint in & these_lints {
522- write ! ( result, "* [`{}`](#{})\n " , lint. name, lint. name. replace( "_" , "-" ) ) . unwrap ( ) ;
522+ writeln ! ( result, "* [`{}`](#{})" , lint. name, lint. name. replace( '_' , "-" ) ) . unwrap ( ) ;
523523 }
524524 result. push ( '\n' ) ;
525525 for lint in & these_lints {
526- write ! ( result, "## {}\n \n " , lint. name. replace( "_" , "-" ) ) . unwrap ( ) ;
526+ write ! ( result, "## {}\n \n " , lint. name. replace( '_' , "-" ) ) . unwrap ( ) ;
527527 for line in & lint. doc {
528528 result. push_str ( line) ;
529529 result. push ( '\n' ) ;
@@ -583,7 +583,7 @@ fn add_rename_redirect(level: Level, output: &mut String) {
583583 let filename = level. doc_filename ( ) . replace ( ".md" , ".html" ) ;
584584 output. push_str ( RENAME_START ) ;
585585 for ( from, to) in * names {
586- write ! ( output, " \" #{from}\" : \" {filename}#{to}\" ,\n " ) . unwrap ( ) ;
586+ writeln ! ( output, " \" #{from}\" : \" {filename}#{to}\" ," ) . unwrap ( ) ;
587587 }
588588 output. push_str ( RENAME_END ) ;
589589 }
0 commit comments