Skip to content

style(clippy): replace match-with-return-None with ? in common.rs#1584

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
clippy-fixer/question-mark-common-1d00b6b3146d381a
Draft

style(clippy): replace match-with-return-None with ? in common.rs#1584
github-actions[bot] wants to merge 1 commit into
mainfrom
clippy-fixer/question-mark-common-1d00b6b3146d381a

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What clippy found

error: this `match` expression can be replaced with `?`
  --> src/compile/common.rs:1733:9
   |
   |         match current.parent() {
   |             Some(parent) => current = parent.to_path_buf(),
   |             None => return None,
   |         }
   |
   = help: for further information visit (rustlang.github.io/redacted)

How it was fixed

Lint: clippy::question_mark
Fix: replaced the match/return None pattern with let parent = current.parent()? — the idiomatic Rust early-return form.
File touched: src/compile/common.rs

Verification

  • cargo build --all-targets
  • cargo test ✅ (all tests pass)
  • cargo clippy --all-targets --all-features --workspace -- -D warnings ✅ (zero warnings/errors)

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • spsprodeus21.vssps.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "spsprodeus21.vssps.visualstudio.com"

See Network Configuration for more information.

Generated by Clippy Fixer · 39 AIC · ⌖ 11.6 AIC · ⊞ 8.5K ·

Apply clippy::question_mark suggestion: the match on parent().is_none()
pattern can be expressed more idiomatically with the ? operator.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot mentioned this pull request Jul 20, 2026
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.

0 participants