infra: add clippy allows; fix PathBuf -> Path
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I07795374f678fa2ec17b4171fa7e32276a6a6964
This commit is contained in:
parent
27160a1eda
commit
b71b2862c9
3 changed files with 18 additions and 14 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue