#dbg #mac #macro

dbg_mac

Handy debug only macros

3 releases

0.1.2 Dec 10, 2022
0.1.1 Dec 10, 2022
0.1.0 Dec 10, 2022

#34 in #unimplemented

Download history 4/week @ 2023-11-12 1/week @ 2023-11-19 14/week @ 2023-11-26 3/week @ 2023-12-17 9/week @ 2023-12-24 12/week @ 2024-01-28 1/week @ 2024-02-04 13/week @ 2024-02-11 75/week @ 2024-02-18

101 downloads per month

GPL-3.0 license

15KB
122 lines

dbg_mac

dbg_mac is a Rust crate that provides macros that are only compiled in if debug symbols are present.

Present Macros

Below are examples of every macro implemented in this crate:

// std::unimplemented, but only if built with debug assertions.
dbg_unimplemented!();

// std::unreachable, but only if built with debug assertions.
dbg_unreachable!();

// std::todo, but only if built with debug assertions.
dbg_todo!();

// std::panic, but only if built with debug assertions.
dbg_panic!();

// std::compile_error, but only if built with debug assertions.
dbg_compile_error!();

// Will print "Hello, debug!", but only if built with debug assertions.
if_dbg!(println!("Hello, debug!"));

Authors

Milo Banks

No runtime deps