Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clippy lints on latest nightly. #1130

Merged
merged 1 commit into from
Nov 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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