File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -691,13 +691,10 @@ fn insert_elem<Pk: MiniscriptKey, Ctx: ScriptContext>(
691
691
// Check whether the new element is worse than any existing element. If there
692
692
// is an element which is a subtype of the current element and has better
693
693
// cost, don't consider this element.
694
- let is_worse = map
695
- . iter ( )
696
- . map ( |( existing_key, existing_elem) | {
697
- let existing_elem_cost = existing_elem. cost_1d ( sat_prob, dissat_prob) ;
698
- existing_key. is_subtype ( elem_key) && existing_elem_cost <= elem_cost
699
- } )
700
- . any ( |x| x) ;
694
+ let is_worse = map. iter ( ) . any ( |( existing_key, existing_elem) | {
695
+ let existing_elem_cost = existing_elem. cost_1d ( sat_prob, dissat_prob) ;
696
+ existing_key. is_subtype ( elem_key) && existing_elem_cost <= elem_cost
697
+ } ) ;
701
698
if !is_worse {
702
699
// If the element is not worse any element in the map, remove elements
703
700
// whose subtype is the current element and have worse cost.
You can’t perform that action at this time.
0 commit comments