@@ -84,7 +84,7 @@ impl Lint {
84
84
for &expected in &["### Example", "### Explanation", "{{produces}}"] {
85
85
if expected == "{{produces}}" && self.is_ignored() {
86
86
if self.doc_contains("{{produces}}") {
87
- return Err(format!(
87
+ return Err(
88
88
"the lint example has `ignore`, but also contains the {{{{produces}}}} marker\n\
89
89
\n\
90
90
The documentation generator cannot generate the example output when the \
@@ -111,7 +111,7 @@ impl Lint {
111
111
Replacing the output with the text of the example you \
112
112
compiled manually yourself.\n\
113
113
"
114
- ) .into());
114
+ .into());
115
115
}
116
116
continue;
117
117
}
@@ -519,11 +519,11 @@ impl<'a> LintExtractor<'a> {
519
519
let mut these_lints: Vec<_> = lints.iter().filter(|lint| lint.level == level).collect();
520
520
these_lints.sort_unstable_by_key(|lint| &lint.name);
521
521
for lint in &these_lints {
522
- write !(result, "* [`{}`](#{})\n ", lint.name, lint.name.replace("_" , "-")).unwrap();
522
+ writeln !(result, "* [`{}`](#{})", lint.name, lint.name.replace('_' , "-")).unwrap();
523
523
}
524
524
result.push('\n');
525
525
for lint in &these_lints {
526
- write!(result, "## {}\n\n", lint.name.replace("_" , "-")).unwrap();
526
+ write!(result, "## {}\n\n", lint.name.replace('_' , "-")).unwrap();
527
527
for line in &lint.doc {
528
528
result.push_str(line);
529
529
result.push('\n');
@@ -583,7 +583,7 @@ fn add_rename_redirect(level: Level, output: &mut String) {
583
583
let filename = level.doc_filename().replace(".md", ".html");
584
584
output.push_str(RENAME_START);
585
585
for (from, to) in *names {
586
- write !(output, " \"#{from}\": \"{filename}#{to}\",\n ").unwrap();
586
+ writeln !(output, " \"#{from}\": \"{filename}#{to}\",").unwrap();
587
587
}
588
588
output.push_str(RENAME_END);
589
589
}
0 commit comments