infra: add clippy allows; fix PathBuf -> Path

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I07795374f678fa2ec17b4171fa7e32276a6a6964
This commit is contained in:
raf 2026-02-12 23:22:26 +03:00
commit 3584117eb8
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
3 changed files with 19 additions and 15 deletions

View file

@ -288,10 +288,9 @@ pub fn detect_vcs_type<P: AsRef<Path>>(path: P) -> VcsType {
.args(["root"])
.current_dir(path)
.output()
&& output.status.success()
{
if output.status.success() {
return VcsType::Jujutsu;
}
return VcsType::Jujutsu;
}
// Check for git
@ -299,10 +298,9 @@ pub fn detect_vcs_type<P: AsRef<Path>>(path: P) -> VcsType {
.args(["rev-parse", "--show-toplevel"])
.current_dir(path)
.output()
&& output.status.success()
{
if output.status.success() {
return VcsType::Git;
}
return VcsType::Git;
}
VcsType::None
@ -333,7 +331,7 @@ pub fn repo_has_uncommitted_changes<P: AsRef<Path>>(path: P) -> Result<bool> {
.current_dir(path)
.output()
.map_err(|e| {
PakkerError::GitError(format!("Failed to run jj status: {}", e))
PakkerError::GitError(format!("Failed to run jj status: {e}"))
})?;
let output_str = String::from_utf8_lossy(&output.stdout);
@ -443,7 +441,7 @@ pub fn ahead_behind<P: AsRef<Path>>(
})?;
Ok((ahead, behind))
} else {
// Remote ref missing count commits reachable from local
// Remote ref missing, count commits reachable from local
let ahead_count = count_commits(&repo, local_oid)?;
Ok((ahead_count, 0))
}