Add macros from the log crate to whitelist
This commit is contained in:
parent
8f395bd953
commit
aeb33986b1
1 changed files with 7 additions and 0 deletions
|
@ -1796,6 +1796,7 @@ fn rewrite_string_lit(context: &RewriteContext, span: Span, shape: Shape) -> Opt
|
||||||
}
|
}
|
||||||
|
|
||||||
const FORMAT_LIKE_WHITELIST: &[&str] = &[
|
const FORMAT_LIKE_WHITELIST: &[&str] = &[
|
||||||
|
// From the Rust Standard Library.
|
||||||
"eprint!",
|
"eprint!",
|
||||||
"eprintln!",
|
"eprintln!",
|
||||||
"format!",
|
"format!",
|
||||||
|
@ -1803,6 +1804,12 @@ const FORMAT_LIKE_WHITELIST: &[&str] = &[
|
||||||
"panic!",
|
"panic!",
|
||||||
"println!",
|
"println!",
|
||||||
"unreachable!",
|
"unreachable!",
|
||||||
|
// From the `log` crate.
|
||||||
|
"debug!",
|
||||||
|
"error!",
|
||||||
|
"info!",
|
||||||
|
"panic!",
|
||||||
|
"warn!",
|
||||||
];
|
];
|
||||||
|
|
||||||
const WRITE_LIKE_WHITELIST: &[&str] = &["assert!", "write!", "writeln!"];
|
const WRITE_LIKE_WHITELIST: &[&str] = &["assert!", "write!", "writeln!"];
|
||||||
|
|
Loading…
Reference in a new issue