Rust logoRust/
RS-C1013

Found `dbg!` macroRS-C1013

Minor severityMinor
Anti-pattern categoryAnti-pattern

The dbg! macro is intended to be a debugging tool, avoid having uses of it in version control. Debug output from production code is better done with other facilities such as the debug! macro from the log crate.

Bad practice

if dbg!(n >= 1) {
    // ...
} else {
    // ...
}

let val = 2 * dbg!(2 - 2);
if n >= 1 {
    // ...
} else {
    // ...
}

let val = 2 * (2 - 2);