Auto merge of #13166 - GuillaumeGomez:fix-clippy-doc, r=xFrednet
Fix display of configs in clippy doc page Fixes https://github.com/rust-lang/rust-clippy/issues/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
This commit is contained in:
commit
668b659b47
@ -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(())
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ fn get_lint_configs(&self, lint_name: &str) -> Option<String> {
|
||||
.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#"
|
||||
|
Loading…
Reference in New Issue
Block a user