fix: Use matches!() based on a new nightly clippy lint

This commit is contained in:
teor 2020-07-15 11:52:23 +10:00
parent dd0cd17b3a
commit e452ba1c13
1 changed files with 2 additions and 4 deletions

View File

@ -133,9 +133,7 @@ impl Transaction {
/// Returns `true` if transaction contains any coinbase inputs.
pub fn contains_coinbase_input(&self) -> bool {
self.inputs().any(|input| match input {
TransparentInput::Coinbase { .. } => true,
_ => false,
})
self.inputs()
.any(|input| matches!(input, TransparentInput::Coinbase { .. }))
}
}