Skip to content

Commit

Permalink
Merge #1130
Browse files Browse the repository at this point in the history
1130: Fix clippy lints on latest nightly. r=Emilgardis a=Alexhuszagh



Co-authored-by: Alex Huszagh <[email protected]>
  • Loading branch information
bors[bot] and Alexhuszagh authored Nov 13, 2022
2 parents 13980dc + 0512e46 commit 5108b9f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/cross_toml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ impl CrossToml {
}

// Builds maps of objects
let mut self_map = to_map(&self)?;
let mut self_map = to_map(self)?;
let other_map = to_map(other)?;

merge_objects(&mut self_map, &other_map).ok_or_else(|| eyre::eyre!("could not merge"))?;
Expand Down
6 changes: 3 additions & 3 deletions src/docker/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl<'a, 'b, 'c> ContainerDataVolume<'a, 'b, 'c> {
let src_path = src.join(file);
let dst_path = temppath.join(file);
file::create_dir_all(dst_path.parent().expect("must have parent"))?;
fs::copy(&src_path, &dst_path)?;
fs::copy(src_path, &dst_path)?;
}
// if copying from a src directory to dst directory with docker, to
// copy the contents from `src` into `dst`, `src` must end with `/.`
Expand Down Expand Up @@ -261,7 +261,7 @@ impl<'a, 'b, 'c> ContainerDataVolume<'a, 'b, 'c> {
// SAFETY: safe, single-threaded execution.
let tempdir = unsafe { temp::TempDir::new()? };
let temppath = tempdir.path();
file::create_dir_all(&temppath.join(rustlib))?;
file::create_dir_all(temppath.join(rustlib))?;
let mut had_symlinks = copy_dir(
&dirs.get_sysroot().join("lib"),
&temppath.join("lib"),
Expand Down Expand Up @@ -295,7 +295,7 @@ impl<'a, 'b, 'c> ContainerDataVolume<'a, 'b, 'c> {
// SAFETY: safe, single-threaded execution.
let tempdir = unsafe { temp::TempDir::new()? };
let temppath = tempdir.path();
file::create_dir_all(&temppath.join(rustlib))?;
file::create_dir_all(temppath.join(rustlib))?;
let had_symlinks = copy_dir(
&dirs.get_sysroot().join(rustlib),
&temppath.join(rustlib),
Expand Down
4 changes: 2 additions & 2 deletions src/docker/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ impl ToolchainDirectories {
let default_nix_store = PathBuf::from("/nix/store");
let nix_store = match nix_store {
Some(store) if store.exists() => {
let path = file::canonicalize(&store)?;
let path = file::canonicalize(store)?;
Some(path)
}
Some(store) => {
Expand Down Expand Up @@ -819,7 +819,7 @@ fn create_target_dir(path: &Path) -> Result<()> {
fs::OpenOptions::new()
.write(true)
.create_new(true)
.open(&path.join("CACHEDIR.TAG"))?
.open(path.join("CACHEDIR.TAG"))?
.write_all(CACHEDIR_TAG.as_bytes())?;
}
Ok(())
Expand Down

0 comments on commit 5108b9f

Please sign in to comment.