Skip to content

Commit 1f7d797

Browse files
committed
fix clippy warnings
1 parent 696a527 commit 1f7d797

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/integration.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ fn integration_test() {
130130
}
131131
}
132132

133+
#[allow(clippy::too_many_lines)]
133134
#[cfg_attr(feature = "integration", test)]
134135
fn integration_test_rustc() {
135136
let repo_name = env::var("INTEGRATION").expect("`INTEGRATION` var not set");
@@ -187,7 +188,7 @@ fn integration_test_rustc() {
187188
// check out the commit in the rustc repo to ensure clippy is compatible with std/core and the
188189
// compiler internals
189190

190-
println!("checking out commit '{}' in rustc repo", commit);
191+
println!("checking out commit '{commit}' in rustc repo");
191192
let st_git_checkout = Command::new("git")
192193
.current_dir(&repo_dir)
193194
.arg("checkout")
@@ -229,16 +230,16 @@ fn integration_test_rustc() {
229230
eprintln!("clippy binaries will be put int {}", sysroot_bin_dir.display());
230231

231232
// copy files from target dir into our $sysroot/bin
232-
std::fs::read_dir(&clippy_exec_dir)
233+
std::fs::read_dir(clippy_exec_dir)
233234
.expect("failed to read clippys target/ dir that we downloaded from previous ci step")
234-
.map(|entry| entry.ok().expect("DirEntry not ok"))
235+
.map(|entry| entry.expect("DirEntry not ok"))
235236
.map(|entry| entry.path())
236237
.filter(|path| path.is_file())
237238
.for_each(|clippy_binary| {
238239
let new_base: PathBuf = sysroot_bin_dir.join("willbeoverwritten"); // file_name() will overwrite this
239240
// set the path from /foo/dir/willbeoverwritten to /foo/dir/cargo-clippy
240241
let bin_file_name: &std::ffi::OsStr = clippy_binary.file_name().unwrap();
241-
let new_path: PathBuf = new_base.with_file_name(&bin_file_name);
242+
let new_path: PathBuf = new_base.with_file_name(bin_file_name);
242243

243244
fs::copy(dbg!(clippy_binary), dbg!(new_path))
244245
.expect("could not copy file from '{clippy_binary}' to '{new_path}'");

0 commit comments

Comments
 (0)