Remove manual implementation of ok

New rustc nightly gives error: manual implementation of `ok`.

Remove it.
This commit is contained in:
Jamil Lambert, PhD 2025-02-04 16:45:47 +00:00
parent 30132c56bb
commit 55ab2f34a7
No known key found for this signature in database
GPG Key ID: 54DC29234AB5D2C0
1 changed files with 2 additions and 10 deletions

View File

@ -47,12 +47,7 @@ impl Instruction<'_> {
_ => None,
}
}
Instruction::PushBytes(bytes) => {
match super::read_scriptint_non_minimal(bytes.as_bytes()) {
Ok(v) => Some(v),
_ => None,
}
}
Instruction::PushBytes(bytes) => super::read_scriptint_non_minimal(bytes.as_bytes()).ok(),
}
}
@ -78,10 +73,7 @@ impl Instruction<'_> {
_ => None,
}
}
Instruction::PushBytes(bytes) => match bytes.read_scriptint() {
Ok(v) => Some(v),
_ => None,
},
Instruction::PushBytes(bytes) => bytes.read_scriptint().ok(),
}
}
}