From 58651147f489dc91585d6175db56cd1374761aa2 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Mon, 15 Aug 2022 10:53:58 -0500 Subject: [PATCH] Remove redundant closure 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 --- tools/testsys/src/aws_resources.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/testsys/src/aws_resources.rs b/tools/testsys/src/aws_resources.rs index 5234250920d..183286fb3cb 100644 --- a/tools/testsys/src/aws_resources.rs +++ b/tools/testsys/src/aws_resources.rs @@ -17,7 +17,6 @@ use model::{ TestSpec, }; use std::collections::BTreeMap; -use std::convert::identity; pub(crate) struct AwsK8s { pub(crate) arch: String, @@ -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")); };