Skip to content

Commit 227a3a9

Browse files
committed
Remove identical if blocks
Clippy emits: error: this `if` has identical blocks Move the second if clause into the first and use `||`.
1 parent 45091a8 commit 227a3a9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/policy/semantic.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,10 +550,9 @@ impl<Pk: MiniscriptKey> Policy<Pk> {
550550
Policy::Older(t) => {
551551
if t.is_height_locked() && age.is_time_locked()
552552
|| t.is_time_locked() && age.is_height_locked()
553+
|| t.to_consensus_u32() > age.to_consensus_u32()
553554
{
554555
Policy::Unsatisfiable
555-
} else if t.to_consensus_u32() > age.to_consensus_u32() {
556-
Policy::Unsatisfiable
557556
} else {
558557
Policy::Older(t)
559558
}

0 commit comments

Comments
 (0)