Skip to content

style(clippy): use ? operator instead of match in find_git_root#1548

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

style(clippy): use ? operator instead of match in find_git_root#1548
github-actions[bot] wants to merge 1 commit into
mainfrom
clippy-fixer/question-mark-common-226d89a355856641

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What clippy found

clippy::question_mark in src/compile/common.rs:1733:

error: this `match` expression can be replaced with `?`
  --> src/compile/common.rs:1733:9
1733 | /         match current.parent() {
1734 | |             Some(parent) => current = parent.to_path_buf(),
1735 | |             None => return None,
1736 | |         }

How it was fixed

Replaced the match current.parent() { Some(p) => ..., None => return None } pattern with let parent = current.parent()?; in the find_git_root helper. One file touched: src/compile/common.rs.

Verification

  • cargo build --all-targets
  • cargo test
  • cargo clippy --all-targets --all-features --workspace -- -D warnings ✅ (exit 0, no warnings)

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 · 38.4 AIC · ⌖ 11.6 AIC · ⊞ 8.5K ·

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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