usage/
usage.rs

1use debug_message::debug;
2
3#[derive(Debug)]
4struct Struct1 {
5    string: String
6}
7
8fn main() {
9    debug("this will be printed only if the DEBUG environment variable is set");
10
11    let number = 123;
12    debug(&format!("{}", number));
13
14    let example_struct = Struct1 { string: String::from("string") };
15    debug(&format!("{:?}, field: {}", example_struct, example_struct.string));
16}