We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88ae2d1 commit b03642eCopy full SHA for b03642e
clippy_lints/src/utils/internal_lints/metadata_collector.rs
@@ -290,12 +290,22 @@ fn collect_configs() -> Vec<ClippyConfiguration> {
290
lints,
291
doc,
292
config_type: x.config_type,
293
- default: x.default.to_string(),
+ default: clarify_default(x.default),
294
}
295
})
296
.collect()
297
298
299
+fn clarify_default(default: &'static str) -> String {
300
+ if let Some((_start, init)) = default.split_once('[') {
301
+ if let Some((init, _end)) = init.split_once(']') {
302
+ return format!("[{}]", init);
303
+ }
304
305
+
306
+ default.to_string()
307
+}
308
309
/// This parses the field documentation of the config struct.
310
///
311
/// ```rust, ignore
0 commit comments