Skip to content

Commit 5108b9f

Browse files
Merge #1130
1130: Fix clippy lints on latest nightly. r=Emilgardis a=Alexhuszagh Co-authored-by: Alex Huszagh <[email protected]>
2 parents 13980dc + 0512e46 commit 5108b9f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/cross_toml.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ impl CrossToml {
251251
}
252252

253253
// Builds maps of objects
254-
let mut self_map = to_map(&self)?;
254+
let mut self_map = to_map(self)?;
255255
let other_map = to_map(other)?;
256256

257257
merge_objects(&mut self_map, &other_map).ok_or_else(|| eyre::eyre!("could not merge"))?;

src/docker/remote.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl<'a, 'b, 'c> ContainerDataVolume<'a, 'b, 'c> {
112112
let src_path = src.join(file);
113113
let dst_path = temppath.join(file);
114114
file::create_dir_all(dst_path.parent().expect("must have parent"))?;
115-
fs::copy(&src_path, &dst_path)?;
115+
fs::copy(src_path, &dst_path)?;
116116
}
117117
// if copying from a src directory to dst directory with docker, to
118118
// copy the contents from `src` into `dst`, `src` must end with `/.`
@@ -261,7 +261,7 @@ impl<'a, 'b, 'c> ContainerDataVolume<'a, 'b, 'c> {
261261
// SAFETY: safe, single-threaded execution.
262262
let tempdir = unsafe { temp::TempDir::new()? };
263263
let temppath = tempdir.path();
264-
file::create_dir_all(&temppath.join(rustlib))?;
264+
file::create_dir_all(temppath.join(rustlib))?;
265265
let mut had_symlinks = copy_dir(
266266
&dirs.get_sysroot().join("lib"),
267267
&temppath.join("lib"),
@@ -295,7 +295,7 @@ impl<'a, 'b, 'c> ContainerDataVolume<'a, 'b, 'c> {
295295
// SAFETY: safe, single-threaded execution.
296296
let tempdir = unsafe { temp::TempDir::new()? };
297297
let temppath = tempdir.path();
298-
file::create_dir_all(&temppath.join(rustlib))?;
298+
file::create_dir_all(temppath.join(rustlib))?;
299299
let had_symlinks = copy_dir(
300300
&dirs.get_sysroot().join(rustlib),
301301
&temppath.join(rustlib),

src/docker/shared.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ impl ToolchainDirectories {
293293
let default_nix_store = PathBuf::from("/nix/store");
294294
let nix_store = match nix_store {
295295
Some(store) if store.exists() => {
296-
let path = file::canonicalize(&store)?;
296+
let path = file::canonicalize(store)?;
297297
Some(path)
298298
}
299299
Some(store) => {
@@ -819,7 +819,7 @@ fn create_target_dir(path: &Path) -> Result<()> {
819819
fs::OpenOptions::new()
820820
.write(true)
821821
.create_new(true)
822-
.open(&path.join("CACHEDIR.TAG"))?
822+
.open(path.join("CACHEDIR.TAG"))?
823823
.write_all(CACHEDIR_TAG.as_bytes())?;
824824
}
825825
Ok(())

0 commit comments

Comments
 (0)