Use !any() instead of find()...is_none()
Clippy emits: warning: called `is_none()` after searching an `Iterator` with `find` As suggested, use the construct: `!foo.iter().any(...)`
This commit is contained in:
parent
74cc80d127
commit
de811bea30
@ -1166,11 +1166,11 @@ where
|
|||||||
// must_spend <- manually selected utxos
|
// must_spend <- manually selected utxos
|
||||||
// may_spend <- all other available utxos
|
// may_spend <- all other available utxos
|
||||||
let mut may_spend = self.get_available_utxos()?;
|
let mut may_spend = self.get_available_utxos()?;
|
||||||
|
|
||||||
may_spend.retain(|may_spend| {
|
may_spend.retain(|may_spend| {
|
||||||
manually_selected
|
!manually_selected
|
||||||
.iter()
|
.iter()
|
||||||
.find(|manually_selected| manually_selected.utxo.outpoint() == may_spend.0.outpoint)
|
.any(|manually_selected| manually_selected.utxo.outpoint() == may_spend.0.outpoint)
|
||||||
.is_none()
|
|
||||||
});
|
});
|
||||||
let mut must_spend = manually_selected;
|
let mut must_spend = manually_selected;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user