3 ms·
You can do this in Rust. Just put a namespace tagged as I think #[cfg(test)] or the like and they can live in the same file but won't be compiled into the non-t
by runevault 4y ago
You can do this in Rust. Just put a namespace tagged as I think #[cfg(test)] or the like and they can live in the same file but won't be compiled into the non-test binary.
- masklinn 4y agoTechnically you don't even have to `cfg`-gate it, it's just good practice to avoid e.g. unused code warnings in the test module.