Skip to content

Commit

Permalink
Fix display of configs in clippy doc page
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jul 26, 2024
1 parent 345c94c commit b5fa6e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clippy_config/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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#"
Expand Down

0 comments on commit b5fa6e2

Please sign in to comment.