Skip to content

Commit

Permalink
Merge pull request #2346 from stmcginnis/redundant-closure
Browse files Browse the repository at this point in the history
Remove redundant closure
  • Loading branch information
etungsten authored Aug 15, 2022
2 parents f5a4ce8 + 5865114 commit e79d47b
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 e79d47b

Please sign in to comment.