Skip to content

Commit

Permalink
style: Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jul 14, 2022
1 parent 1b9eda1 commit 5e3fb4f
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,7 @@ pub fn resolve_manifests(
cmd.manifest_path(&manifest_path);
let result = cmd.exec().with_context(|| "Invalid manifest")?;
let pkgs = if workspace {
result
.packages
.into_iter()
.map(|package| package)
.collect::<Vec<_>>()
result.packages
} else if !pkgid.is_empty() {
pkgid
.into_iter()
Expand All @@ -100,13 +96,7 @@ pub fn resolve_manifests(
.iter()
.find(|p| p.manifest_path == manifest_path)
.map(|p| vec![(p.to_owned())])
.unwrap_or_else(|| {
result
.packages
.into_iter()
.map(|package| package)
.collect::<Vec<_>>()
})
.unwrap_or_else(|| result.packages)
};
Ok(pkgs)
}
Expand Down

0 comments on commit 5e3fb4f

Please sign in to comment.