From e3729eb03b391fcc94e39d11c750f96b6cdda4d0 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 28 Oct 2023 13:20:49 +0200 Subject: Fix clippy warnings --- src/nixpkgs.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nixpkgs.rs') diff --git a/src/nixpkgs.rs b/src/nixpkgs.rs index 7e622c2..6656543 100644 --- a/src/nixpkgs.rs +++ b/src/nixpkgs.rs @@ -56,7 +56,7 @@ impl<'a> Nixpkgs<'a> { fn git_command(&self, subcommand: impl AsRef) -> Command { let mut command = Command::new("git"); command.arg("-C"); - command.arg(&self.path); + command.arg(self.path); command.arg(subcommand); command } @@ -64,7 +64,7 @@ impl<'a> Nixpkgs<'a> { async fn git_branch_contains(&self, commit: &str) -> Result> { let output = self .git_command("branch") - .args(&["-r", "--format=%(refname)", "--contains"]) + .args(["-r", "--format=%(refname)", "--contains"]) .arg(commit) .stderr(Stdio::inherit()) .output() @@ -79,7 +79,7 @@ impl<'a> Nixpkgs<'a> { async fn git_fetch_nixpkgs(&self) -> Result<()> { // TODO: add refspecs self.git_command("fetch") - .arg(&self.remote_name) + .arg(self.remote_name) .status() .await .map_err(Error::Io) @@ -109,7 +109,7 @@ impl<'a> Nixpkgs<'a> { }; let mut prefix = PathBuf::from("refs/remotes/"); - prefix.push(&self.remote_name); + prefix.push(self.remote_name); for branch_name in output .split(|byte| *byte == b'\n') -- cgit 1.4.1