Skip to content

Commit aa722c2

Browse files
committed
feat: remove inefficient if check on match lex
1 parent 460400d commit aa722c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/miniscript/lex.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ pub fn lex(script: &'_ script::Script) -> Result<Vec<Token<'_>>, Error> {
138138
ret.push(Token::CheckMultiSig);
139139
ret.push(Token::Verify);
140140
}
141-
script::Instruction::Op(op) if op == opcodes::all::OP_CSV => {
141+
script::Instruction::Op(opcodes::all::OP_CSV) => {
142142
ret.push(Token::CheckSequenceVerify);
143143
}
144-
script::Instruction::Op(op) if op == opcodes::all::OP_CLTV => {
144+
script::Instruction::Op(opcodes::all::OP_CLTV) => {
145145
ret.push(Token::CheckLockTimeVerify);
146146
}
147147
script::Instruction::Op(opcodes::all::OP_FROMALTSTACK) => {

0 commit comments

Comments
 (0)