diff --git a/cargo-dist/src/lib.rs b/cargo-dist/src/lib.rs index a1a959756..b514432f2 100644 --- a/cargo-dist/src/lib.rs +++ b/cargo-dist/src/lib.rs @@ -852,12 +852,12 @@ fn do_ldd(path: &Utf8PathBuf) -> DistResult> { let mut libraries = vec![]; let output = Command::new("ldd") - .arg(&path) + .arg(path) .output() .expect("Unable to run ldd"); let result = String::from_utf8_lossy(&output.stdout).to_string(); - let lines = result.trim_end().split("\n"); + let lines = result.trim_end().split('\n'); for line in lines { let line = line.trim(); @@ -868,7 +868,7 @@ fn do_ldd(path: &Utf8PathBuf) -> DistResult> { // Format: libname.so.1 => /path/to/libname.so.1 (address) if let Some(path) = line.split("=>").nth(1) { - libraries.push((path.split(' ').nth(0).unwrap()).to_owned()); + libraries.push((path.split(' ').next().unwrap()).to_owned()); } else { continue; } @@ -901,7 +901,7 @@ fn determine_linkage(path: &Utf8PathBuf, target: &str) -> DistResult { } // Can be run on any OS "i686-pc-windows-msvc" | "x86_64-pc-windows-msvc" | "aarch64-pc-windows-msvc" => { - do_pe(&path)? + do_pe(path)? } _ => return Err(DistError::LinkageCheckUnsupportedBinary {}), };