Replace seperate filter and map with filter_map
This commit is contained in:
parent
e19b99112e
commit
362a9b4da8
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue