Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a clippy::collapsible_match lint #2642

Merged
merged 1 commit into from
Aug 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions zebra-consensus/src/transaction/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,15 @@ fn v5_fake_transactions() -> Result<(), Report> {
check::coinbase_tx_no_prevout_joinsplit_spend(&transaction)?;

// validate the sapling shielded data
match transaction {
Transaction::V5 {
sapling_shielded_data,
..
} => {
if let Some(s) = sapling_shielded_data {
for spend in s.spends_per_anchor() {
check::spend_cv_rk_not_small_order(&spend)?
}
for output in s.outputs() {
check::output_cv_epk_not_small_order(output)?;
}
}
if transaction.version() == 5 {
for spend in transaction.sapling_spends_per_anchor() {
check::spend_cv_rk_not_small_order(&spend)?;
}
_ => panic!("we should have no tx other than 5"),
for output in transaction.sapling_outputs() {
check::output_cv_epk_not_small_order(output)?;
}
} else {
panic!("we should have no tx other than 5");
}
}
}
Expand Down