mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
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:
@ -455,11 +455,10 @@ impl FinalizedBlockTracker {
|
||||
/// Updates the tracked finalized block and returns the new finalized block if it changed
|
||||
fn update(&mut self, finalized_block: Option<BlockNumber>) -> Option<BlockNumber> {
|
||||
let finalized = finalized_block?;
|
||||
if self.last_finalized_block.replace(finalized).map_or(true, |last| last < finalized) {
|
||||
Some(finalized)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
self.last_finalized_block
|
||||
.replace(finalized)
|
||||
.map_or(true, |last| last < finalized)
|
||||
.then_some(finalized)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user