mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
Place default values near its definitions
This patch not only improves visibility, but also fixes a potential bug. When a lint description ends with code block, the string will have three backquotes at the end. Since the current implementation prints the default value immediately after that, the markdown renderer is unable to properly close the code block.
This commit is contained in:
parent
4f1bae0c96
commit
fae19a9a79
@ -558,8 +558,8 @@ impl fmt::Display for ClippyConfiguration {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> fmt::Result {
|
||||
writeln!(
|
||||
f,
|
||||
"* `{}`: `{}`: {} (defaults to `{}`)",
|
||||
self.name, self.config_type, self.doc, self.default
|
||||
"* `{}`: `{}`(defaults to `{}`): {}",
|
||||
self.name, self.config_type, self.default, self.doc
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user