diff --git a/src/compile/common.rs b/src/compile/common.rs index 7737d757..8d8e7d5c 100644 --- a/src/compile/common.rs +++ b/src/compile/common.rs @@ -1730,9 +1730,9 @@ fn find_git_root(path: &std::path::Path) -> Option { if current.join(".git").exists() { return Some(current); } - match current.parent() { - Some(parent) => current = parent.to_path_buf(), - None => return None, + { + let parent = current.parent()?; + current = parent.to_path_buf() } } }