Fix display of configs in clippy doc page

This commit is contained in:
Guillaume Gomez 2024-07-26 14:23:46 +02:00
parent 345c94c98f
commit b5fa6e28d4
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ impl fmt::Display for ClippyConfiguration {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "- `{}`: {}", self.name, self.doc)?;
if !self.default.is_empty() {
write!(f, " (default: `{}`)", self.default)?;
write!(f, "\n\n(default: `{}`)", self.default)?;
}
Ok(())
}

View File

@ -167,7 +167,7 @@ impl MetadataCollector {
.iter()
.filter(|config| config.lints.iter().any(|lint| lint == lint_name))
.map(ToString::to_string)
.reduce(|acc, x| acc + &x)
.reduce(|acc, x| acc + "\n\n" + &x)
.map(|configurations| {
format!(
r#"