Skip to content

Guard against use of `dbg!` in production code

Looks like at least one dbg! slipped into the 0.0.1 release; I got this while running arti @ e9cbf8c5 during consensus download:

[crates/tor-dirmgr/src/state.rs:637] "Adding 1 from download" = "Adding 1 from download"

@nickm said he'd fix this particular instance, but it's worth adding some checks to ensure things like this don't slip through in future.

There's Clippy's dbg_macro lint, but we probably don't want to #![deny(..)] that in the actual code, because then debugging would be painful.

What we should probably do is run clippy with -D clippy::dbg_macro in CI, or something like that.