Skip to content

Commit

Permalink
Remove redundant closure
Browse files Browse the repository at this point in the history
Clippy warnings about a redundant closure. The closure just makes a call
to a function that would take the passed argument anyway, so we should
remove the closure and just provide the function directly.

Signed-off-by: Sean McGinnis <[email protected]>
  • Loading branch information
stmcginnis committed Aug 15, 2022
1 parent f5a4ce8 commit 5865114
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tools/testsys/src/aws_resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use model::{
TestSpec,
};
use std::collections::BTreeMap;
use std::convert::identity;

pub(crate) struct AwsK8s {
pub(crate) arch: String,
Expand Down Expand Up @@ -465,10 +464,7 @@ where
.send()
.await?
.images;
let images: Vec<&Image> = describe_images
.iter()
.flat_map(|image| identity(image))
.collect();
let images: Vec<&Image> = describe_images.iter().flatten().collect();
if images.len() > 1 {
return Err(anyhow!("Multiple images were found"));
};
Expand Down

0 comments on commit 5865114

Please sign in to comment.