I\'m writing a program in Rust and I have some tests for it. I wrote a helper function for these tests, but whenever I build using cargo build it warns me that
cargo build
If something is only used in tests, it should be omitted altogether. This can be done with the #[cfg(test)] attribute.
#[cfg(test)]