Repository navigation
fix: resolve clippy question_mark errors in body.rs - #13
Merged
offskip-dave merged 1 commit intoNov 21, 2026
Merged
Conversation
1 task done
There was a problem hiding this comment.
🟢 Approval recommended
The review evidence indicates this is a limited refactor in a single file that replaces repetitive Option unwrapping with ? to satisfy Clippy’s question_mark lint while preserving the existing None return behavior, with no outstanding issues noted.
No open issues 🎉
What changed in this PR
Resolves CI failures from Clippy’s question_mark lint (with -D warnings) by refactoring Option-based early returns in color-parsing helpers to use ? without changing behavior.
Changes:
- Rewrote four
let ... else { return None; }patterns to?intake_explicit_colorandtake_bare_color. - Preserved the same
Nonereturn conditions while restoring Clippy compliance on stable Rust.
| File | Description |
|---|---|
| crates/devnull/src/body.rs | Replaces four let-else Option unwrapping blocks with ? in color parsing helpers to satisfy Clippy’s question_mark lint while keeping behavior unchanged. |
Review effort: Balanced
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
offskip-dave
approved these changes
Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI has failed on
mainsince 6370123. Clippy'squestion_marklint (on stable since Rust 1.100) flags fourlet ... else { return None; }blocks incrates/devnull/src/body.rs, and-D warningsmakes them errors. Clippy fails, so the Test step never runs, on both the Ubuntu and macOS jobs.Fix
Rewrites the four blocks in
take_explicit_colorandtake_bare_colorwith?, as Clippy suggests. Each returnsNonein the same cases as before, so behaviour is unchanged.Tests
Run in a Debian trixie container with Rust 1.100 and the same GTK packages as CI:
cargo fmt --all -- --check: passed.cargo clippy --locked --workspace --all-targets -- -D warnings: passed (it failed with these four errors before).cargo test --locked --workspace: all passed.Screenshots