Skip to content

Commit aeb3398

Browse files
committed
Add macros from the log crate to whitelist
1 parent 8f395bd commit aeb3398

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/expr.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,13 +1796,20 @@ fn rewrite_string_lit(context: &RewriteContext, span: Span, shape: Shape) -> Opt
17961796
}
17971797

17981798
const FORMAT_LIKE_WHITELIST: &[&str] = &[
1799+
// From the Rust Standard Library.
17991800
"eprint!",
18001801
"eprintln!",
18011802
"format!",
18021803
"format_args!",
18031804
"panic!",
18041805
"println!",
18051806
"unreachable!",
1807+
// From the `log` crate.
1808+
"debug!",
1809+
"error!",
1810+
"info!",
1811+
"panic!",
1812+
"warn!",
18061813
];
18071814

18081815
const WRITE_LIKE_WHITELIST: &[&str] = &["assert!", "write!", "writeln!"];

0 commit comments

Comments
 (0)