Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
mistydemeo committed Sep 19, 2023
1 parent 246c2f4 commit 33ff111
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cargo-dist/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,12 +852,12 @@ fn do_ldd(path: &Utf8PathBuf) -> DistResult<Vec<String>> {
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();
Expand All @@ -868,7 +868,7 @@ fn do_ldd(path: &Utf8PathBuf) -> DistResult<Vec<String>> {

// 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;
}
Expand Down Expand Up @@ -901,7 +901,7 @@ fn determine_linkage(path: &Utf8PathBuf, target: &str) -> DistResult<Linkage> {
}
// 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 {}),
};
Expand Down

0 comments on commit 33ff111

Please sign in to comment.