Closed palant closed 2 years ago
In fact, I also removed the wildcard import for nannou::prelude
even though it would be allowed by that clippy rule. That prelude defines way too much stuff, and constants like PURPLE
or namespaces like wgpu
popping up out of nowhere certainly doesn’t help understanding the code.
See https://rust-lang.github.io/rust-clippy/master/#wildcard_imports for recommendations on imports. This rule isn’t enforced by default but running
cargo clippy -- -W clippy::wildcard_imports
will make the warnings show up. In general, importing stuff inmain.rs
that isn’t used there but is transitively imported elsewhere is very confusing. Also,use super::*
in tests usually takes care of all import needs.