Skip to content

chore(lint): enable clippy::todo#90

Merged
tupe12334 merged 1 commit into
mainfrom
clippy/enable-todo
Jun 26, 2026
Merged

chore(lint): enable clippy::todo#90
tupe12334 merged 1 commit into
mainfrom
clippy/enable-todo

Conversation

@tupe12334

Copy link
Copy Markdown
Member

Summary

Enables clippy::todo = "deny" in [lints.clippy], preventing todo!() placeholders from reaching production code. This follows the same pattern as the existing dbg_macro = "deny" lint — both catch development-only constructs that cause runtime panics if accidentally shipped.

Also fixes pre-existing pedantic violations so that cargo clippy --all-targets passes cleanly:

  • 4 map_unwrap_or: .map(f).unwrap_or(false).is_ok_and(f)
  • 12 duration_suboptimal_units in test code: Duration::from_secs(N)from_hours/from_mins equivalents

Closes #89


This pull request was opened by the Clippy lint improvements → issue + PR (Rust repos) routine of moadim. @tupe12334

Adds `todo = "deny"` to [lints.clippy] in Cargo.toml, preventing
`todo!()` placeholders from reaching production code.

Also fixes pre-existing pedantic violations surfaced by running
`cargo clippy --all-targets`:
- Four `map_unwrap_or` violations: replace `.map(f).unwrap_or(false)`
  with the idiomatic `.is_ok_and(f)`.
- Twelve `duration_suboptimal_units` violations in test code: replace
  `Duration::from_secs(N)` with `from_hours`/`from_mins` equivalents.
@tupe12334 tupe12334 merged commit 144ca5b into main Jun 26, 2026
1 check passed
@tupe12334 tupe12334 deleted the clippy/enable-todo branch June 26, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable clippy::todo lint

1 participant