Skip to content

Commit 668b659

Browse files
committed
Auto merge of #13166 - GuillaumeGomez:fix-clippy-doc, r=xFrednet
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
2 parents 236c8c7 + b5fa6e2 commit 668b659

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clippy_config/src/metadata.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ impl fmt::Display for ClippyConfiguration {
1313
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1414
write!(f, "- `{}`: {}", self.name, self.doc)?;
1515
if !self.default.is_empty() {
16-
write!(f, " (default: `{}`)", self.default)?;
16+
write!(f, "\n\n(default: `{}`)", self.default)?;
1717
}
1818
Ok(())
1919
}

clippy_lints/src/utils/internal_lints/metadata_collector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ impl MetadataCollector {
167167
.iter()
168168
.filter(|config| config.lints.iter().any(|lint| lint == lint_name))
169169
.map(ToString::to_string)
170-
.reduce(|acc, x| acc + &x)
170+
.reduce(|acc, x| acc + "\n\n" + &x)
171171
.map(|configurations| {
172172
format!(
173173
r#"

0 commit comments

Comments
 (0)