]> git.r.bdr.sh - rbdr/blog/commitdiff
Apply clippy
authorRuben Beltran del Rio <redacted>
Tue, 7 Jan 2025 20:19:35 +0000 (21:19 +0100)
committerRuben Beltran del Rio <redacted>
Tue, 7 Jan 2025 20:19:35 +0000 (21:19 +0100)
src/remote/git.rs

index 556bed4050f36e293534566bbc76d7a926eca9b2..c260df80dca59f6a6cddb5203cea7f05ffbee63d 100644 (file)
@@ -87,7 +87,7 @@ mod tests {
         let remote_path = path.display();
         Command::new("sh")
             .arg("-c")
-            .arg(&format!("cd {remote_path} && git init --bare"))
+            .arg(format!("cd {remote_path} && git init --bare"))
             .stdout(Stdio::null())
             .stderr(Stdio::null())
             .status()
@@ -97,7 +97,7 @@ mod tests {
     fn assert_file_does_not_exist(repo_path: &str, file_path: &str) {
         let output = Command::new("sh")
             .arg("-c")
-            .arg(&format!("cd {repo_path} && git show main:{file_path}"))
+            .arg(format!("cd {repo_path} && git show main:{file_path}"))
             .stderr(Stdio::null())
             .output()
             .expect("Failed to read from repo");
@@ -108,7 +108,7 @@ mod tests {
     fn assert_file_in_repo_with_contents(repo_path: &str, file_path: &str, contents: &str) {
         let output = Command::new("sh")
             .arg("-c")
-            .arg(&format!("cd {repo_path} && git show main:{file_path}"))
+            .arg(format!("cd {repo_path} && git show main:{file_path}"))
             .stderr(Stdio::null())
             .output()
             .expect("Failed to read from repo");
@@ -124,7 +124,7 @@ mod tests {
 
         Command::new("sh")
             .arg("-c")
-            .arg(&format!(
+            .arg(format!(
                 "cd {test_dir_display} && \
                  git clone {repo_path} . && \
                  echo '{contents}' > {file_path} && \