Skip to content

Commit 65893c0

Browse files
style(clippy): replace match-with-return-None with ? in common.rs (#1619)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c186b37 commit 65893c0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/compile/common.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,9 +1745,9 @@ fn find_git_root(path: &std::path::Path) -> Option<std::path::PathBuf> {
17451745
if current.join(".git").exists() {
17461746
return Some(current);
17471747
}
1748-
match current.parent() {
1749-
Some(parent) => current = parent.to_path_buf(),
1750-
None => return None,
1748+
{
1749+
let parent = current.parent()?;
1750+
current = parent.to_path_buf()
17511751
}
17521752
}
17531753
}

0 commit comments

Comments
 (0)