Skip to content

Commit 6b6f808

Browse files
committed
Use any combinator
Clippy emits: warning: called `is_some()` after searching an `Iterator` with `find` As suggested, use the `any` combinator instead of `is_some` after `find`.
1 parent 6088c25 commit 6b6f808

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/psbt/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,8 +1560,7 @@ mod tests {
15601560
assert!(psbt_input
15611561
.tap_scripts
15621562
.values()
1563-
.find(|value| *value == &(first_script.clone(), LeafVersion::TapScript))
1564-
.is_some());
1563+
.any(|value| *value == (first_script.clone(), LeafVersion::TapScript)));
15651564
TapLeafHash::from_script(&first_script, LeafVersion::TapScript)
15661565
};
15671566

0 commit comments

Comments
 (0)