From 362a9b4da84d26b672d42354e4ab9f16c573a325 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Tue, 2 Feb 2021 20:01:52 -0800 Subject: [PATCH] Replace seperate filter and map with filter_map --- src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index fbcf2f5..bc380b4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -318,8 +318,7 @@ impl FuzzyPublicKey { let results: Vec = (0..8) .into_par_iter() .map(|_x| FuzzyPublicKey::try_entangled_tag(arc_public_keys.clone(), length)) - .filter(|x| x.is_ok()) - .map(|x| x.unwrap()) + .filter_map(|x| x.ok()) .collect(); if results.is_empty() == false { return results[0].clone();