Summary
Enable the clippy::unnecessary_wraps lint by adding it to the [lints.clippy] table in core/Cargo.toml.
This continues the project's incremental lint-ratcheting policy (one lint promoted to deny per PR).
What the lint catches
clippy::unnecessary_wraps flags functions that always return Ok(...) (or Some(...)) and never return Err/None, yet declare a Result<T> / Option<T> return type. The wrapper type is dead weight: it forces every caller to handle an error case that can never occur.
Why it improves code quality
- Honest signatures — the return type should reflect what the function can actually do. A function that never fails should not advertise fallibility.
- Less caller boilerplate — removes pointless
?, .unwrap(), and match Ok/Err arms at call sites.
- Smaller error surface — fewer spurious error paths to reason about and test.
Current state
Baseline cargo clippy --all-targets is clean. Enabling this lint surfaces exactly one real violation:
core/src/bin/main.rs — run_validate() returns io::Result<bool> but never returns Err; all branches return Ok(...).
The accompanying PR enables the lint and fixes that single function (returning plain bool), simplifying the validate command's call site and the related tests.
This issue was opened by the "Clippy lint improvements → issue + PR (Rust repos) → Slack" routine of moadim.
Summary
Enable the
clippy::unnecessary_wrapslint by adding it to the[lints.clippy]table incore/Cargo.toml.This continues the project's incremental lint-ratcheting policy (one lint promoted to
denyper PR).What the lint catches
clippy::unnecessary_wrapsflags functions that always returnOk(...)(orSome(...)) and never returnErr/None, yet declare aResult<T>/Option<T>return type. The wrapper type is dead weight: it forces every caller to handle an error case that can never occur.Why it improves code quality
?,.unwrap(), andmatch Ok/Errarms at call sites.Current state
Baseline
cargo clippy --all-targetsis clean. Enabling this lint surfaces exactly one real violation:core/src/bin/main.rs—run_validate()returnsio::Result<bool>but never returnsErr; all branches returnOk(...).The accompanying PR enables the lint and fixes that single function (returning plain
bool), simplifying thevalidatecommand's call site and the related tests.This issue was opened by the "Clippy lint improvements → issue + PR (Rust repos) → Slack" routine of moadim.