chore(clippy): enable if_then_some_else_none lint (#11679)

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Delweng
2024-10-14 23:45:26 +08:00
committed by GitHub
parent 523bfb9c81
commit f684dd4c4c
22 changed files with 87 additions and 135 deletions

View File

@ -267,11 +267,7 @@ mod tests {
let mut receipt = random_receipt(&mut rng, transaction, Some(1));
receipt.logs.push(random_log(
&mut rng,
if txi == (block.body.transactions.len() - 1) {
Some(deposit_contract_addr)
} else {
None
},
(txi == (block.body.transactions.len() - 1)).then_some(deposit_contract_addr),
Some(1),
));
receipts.push((receipts.len() as u64, receipt));