Skip to content

Commit a4a98d8

Browse files
committed
applease clippy
1 parent 3ea73ce commit a4a98d8

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/cmd/sandbox.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl SandboxImage {
3131
let mut image = SandboxImage { name: name.into() };
3232
info!("pulling image {} from Docker Hub", name);
3333
Command::new_workspaceless("docker")
34-
.args(&["pull", &name])
34+
.args(&["pull", name])
3535
.run()
3636
.map_err(|e| CommandError::SandboxImagePullFailed(Box::new(e)))?;
3737
if let Some(name_with_hash) = image.get_name_with_hash() {

src/inside_docker.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub(crate) fn probe_container_id(workspace: &Workspace) -> Result<Option<String>
6565
info!("probing container id {}", id);
6666

6767
let res = Command::new(workspace, "docker")
68-
.args(&["exec", &id, "cat", probe_path_str])
68+
.args(&["exec", id, "cat", probe_path_str])
6969
.log_output(false)
7070
.log_command(false)
7171
.run_capture();

src/native/unix.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn executable_mode_for(path: &Path) -> Result<u32, Error> {
5050
pub(crate) fn is_executable<P: AsRef<Path>>(path: P) -> Result<bool, Error> {
5151
let path = path.as_ref();
5252

53-
let expected_mode = executable_mode_for(&path)?;
53+
let expected_mode = executable_mode_for(path)?;
5454
Ok(path.metadata()?.mode() & expected_mode == expected_mode)
5555
}
5656

@@ -59,7 +59,7 @@ pub(crate) fn make_executable<P: AsRef<Path>>(path: P) -> Result<(), Error> {
5959

6060
// Set the executable and readable bits on the file
6161
let mut perms = path.metadata()?.permissions();
62-
let new_mode = perms.mode() | executable_mode_for(&path)?;
62+
let new_mode = perms.mode() | executable_mode_for(path)?;
6363
perms.set_mode(new_mode);
6464

6565
::std::fs::set_permissions(path, perms)?;

src/prepare.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl<'a> Prepare<'a> {
8686

8787
fn tweak_toml(&self) -> Result<(), Error> {
8888
let path = self.source_dir.join("Cargo.toml");
89-
let mut tweaker = TomlTweaker::new(&self.krate, &path, &self.patches)?;
89+
let mut tweaker = TomlTweaker::new(self.krate, &path, &self.patches)?;
9090
tweaker.tweak();
9191
tweaker.save(&path)?;
9292
Ok(())

src/utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fn strip_verbatim_from_prefix(prefix: &PrefixComponent<'_>) -> Option<PathBuf> {
6868
}
6969

7070
pub(crate) fn remove_file(path: &Path) -> std::io::Result<()> {
71-
std::fs::remove_file(&path).map_err(|error| crate::utils::improve_remove_error(error, &path))
71+
std::fs::remove_file(&path).map_err(|error| crate::utils::improve_remove_error(error, path))
7272
}
7373

7474
pub(crate) fn remove_dir_all(path: &Path) -> std::io::Result<()> {

src/workspace.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ impl Workspace {
232232

233233
for path in &paths {
234234
if path.exists() {
235-
crate::utils::remove_dir_all(&path)?;
235+
crate::utils::remove_dir_all(path)?;
236236
}
237237
}
238238

0 commit comments

Comments
 (0)