binary_size_test_hash/
binary_size_test_hash.rs

1//! Binary size test with hash feature enabled
2
3use waddling_errors::prelude::*;
4
5const ERR1: Code = error("TEST", "ONE", 1);
6const ERR2: Code = warning("TEST", "TWO", 2);
7const ERR3: Code = success("TEST", "THREE", 3);
8
9fn main() {
10    // Force the compiler to include the codes and hashing
11    println!("{}", ERR1.code());
12    println!("{}", ERR2.code());
13    println!("{}", ERR3.code());
14
15    #[cfg(feature = "hash")]
16    {
17        println!("Hash1: {}", ERR1.hash());
18        println!("Hash2: {}", ERR2.hash());
19        println!("Hash3: {}", ERR3.hash());
20    }
21}