From a16c01c90781076e9028782ea42975218be37b14 Mon Sep 17 00:00:00 2001 From: Marcel Hellwig Date: Fri, 3 Jun 2022 09:04:18 +0200 Subject: [PATCH] fix clippy::manual_map --- src/adaptors/mod.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/adaptors/mod.rs b/src/adaptors/mod.rs index 19008ccf2..3c052ad04 100644 --- a/src/adaptors/mod.rs +++ b/src/adaptors/mod.rs @@ -327,12 +327,7 @@ impl Iterator for Product } Some(x) => x }; - match self.a_cur { - None => None, - Some(ref a) => { - Some((a.clone(), elt_b)) - } - } + self.a_cur.as_ref().map(|a| (a.clone(), elt_b)) } fn size_hint(&self) -> (usize, Option) {