Enable clippy::enum_glob_use
What it catches
clippy::enum_glob_use (a pedantic lint) flags glob imports of enum variants, e.g. use MyEnum::*;. It pushes code toward explicit variant references (MyEnum::Variant) or named imports instead.
Why it improves code quality
- Readability / origin clarity — at a use site,
Pending could come from anywhere; Status::Pending (or an explicit use Status::Pending) makes the source obvious.
- Avoids name collisions — globbing two enums into scope can silently shadow or clash variant names; explicit paths prevent ambiguity.
- Complements existing lints — this crate already denies
clippy::wildcard_imports. enum_glob_use closes the matching gap for enum-variant globs, keeping the import policy consistent.
Scope
- Enable exactly one lint: add
enum_glob_use = "deny" to the [lints.clippy] table in core/Cargo.toml, matching the crate's existing incremental ratchet convention.
- Current violations in the tree: 0 — this is a clean regression guard.
cargo clippy --all-targets, cargo build, and cargo test all pass.
A PR implementing this follows.
This issue was opened by the Clippy lint improvements → issue + PR (Rust repos) → Slack routine of moadim.
Enable
clippy::enum_glob_useWhat it catches
clippy::enum_glob_use(apedanticlint) flags glob imports of enum variants, e.g.use MyEnum::*;. It pushes code toward explicit variant references (MyEnum::Variant) or named imports instead.Why it improves code quality
Pendingcould come from anywhere;Status::Pending(or an explicituse Status::Pending) makes the source obvious.clippy::wildcard_imports.enum_glob_usecloses the matching gap for enum-variant globs, keeping the import policy consistent.Scope
enum_glob_use = "deny"to the[lints.clippy]table incore/Cargo.toml, matching the crate's existing incremental ratchet convention.cargo clippy --all-targets,cargo build, andcargo testall pass.A PR implementing this follows.
This issue was opened by the Clippy lint improvements → issue + PR (Rust repos) → Slack routine of moadim.