style: prefer then_some over if else (#1810)

This commit is contained in:
Roman Krasiuk
2023-03-17 15:16:29 +02:00
committed by GitHub
parent ef51f566fe
commit 9036f5ea9f
7 changed files with 10 additions and 13 deletions

View File

@ -29,6 +29,6 @@ pub fn to_reth_acc(revm_acc: &AccountInfo) -> Account {
Account {
balance: revm_acc.balance,
nonce: revm_acc.nonce,
bytecode_hash: if code_hash == KECCAK_EMPTY { None } else { Some(code_hash) },
bytecode_hash: (code_hash != KECCAK_EMPTY).then_some(code_hash),
}
}