Skip to content

Commit

Permalink
Auto merge of #13166 - GuillaumeGomez:fix-clippy-doc, r=xFrednet
Browse files Browse the repository at this point in the history
Fix display of configs in clippy doc page

Fixes #13051.

It was simply some empty lines missing between configs. With this fix it looks like expected:

![image](https://github.com/user-attachments/assets/89c609b4-e24a-4f4a-91c1-3b49fc83584c)

r? `@xFrednet`

changelog: Fix display of configs in clippy doc page
  • Loading branch information
bors committed Jul 28, 2024
2 parents 236c8c7 + b5fa6e2 commit 668b659
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 668b659

Please sign in to comment.