Replace seperate filter and map with filter_map

This commit is contained in:
Sarah Jamie Lewis 2021-02-02 20:01:52 -08:00
parent e19b99112e
commit 362a9b4da8
1 changed files with 1 additions and 2 deletions

View File

@ -318,8 +318,7 @@ impl FuzzyPublicKey {
let results: Vec<FuzzyTag> = (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();