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)
|
let results: Vec<FuzzyTag> = (0..8)
|
||||||
.into_par_iter()
|
.into_par_iter()
|
||||||
.map(|_x| FuzzyPublicKey::try_entangled_tag(arc_public_keys.clone(), length))
|
.map(|_x| FuzzyPublicKey::try_entangled_tag(arc_public_keys.clone(), length))
|
||||||
.filter(|x| x.is_ok())
|
.filter_map(|x| x.ok())
|
||||||
.map(|x| x.unwrap())
|
|
||||||
.collect();
|
.collect();
|
||||||
if results.is_empty() == false {
|
if results.is_empty() == false {
|
||||||
return results[0].clone();
|
return results[0].clone();
|
||||||
|
|
Loading…
Reference in New Issue