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:
koka 2022-12-26 01:51:46 +09:00
parent 4f1bae0c96
commit fae19a9a79
No known key found for this signature in database
GPG Key ID: A5917A40697774CD

View File

@ -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
)
}
}