Skip to content

Commit 4678cbe

Browse files
committed
style: enable clippy::(dbg_macro|todo) across the workspace
1 parent 62d489c commit 4678cbe

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ walkdir = "2"
164164
[workspace.lints.rust]
165165
rust_2018_idioms = "deny"
166166

167+
[workspace.lints.clippy]
168+
# `dbg!()` and `todo!()` clearly shouldn't make it to production:
169+
dbg_macro = "warn"
170+
todo = "warn"
171+
167172
[lib]
168173
name = "rustup"
169174
path = "src/lib.rs"

src/test/mock/clitools.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,11 @@ impl Config {
668668
println!("expected.ok: true");
669669
print_indented("expected.stdout", stdout);
670670
print_indented("expected.stderr", stderr);
671-
dbg!(out.stdout == stdout);
672-
dbg!(out.stderr == stderr);
671+
#[allow(clippy::dbg_macro)]
672+
{
673+
dbg!(out.stdout == stdout);
674+
dbg!(out.stderr == stderr);
675+
}
673676
panic!();
674677
}
675678
}

0 commit comments

Comments
 (0)