Skip to content

Commit

Permalink
Simplify for clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed Apr 23, 2024
1 parent 73cb982 commit 958bac4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions beacon_node/beacon_chain/src/block_times_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,8 @@ impl BlockDelays {
.execution_time
.and_then(|execution_time| execution_time.checked_sub(times.observed?));
// Duration since UNIX epoch at which block became available.
let available_time = times.execution_time.and_then(|execution_time| {
if let Some(all_blobs_observed) = times.all_blobs_observed {
Some(std::cmp::max(execution_time, all_blobs_observed))
} else {
Some(execution_time)
}
let available_time = times.execution_time.map(|execution_time| {
std::cmp::max(execution_time, times.all_blobs_observed.unwrap_or_default())
});
// Duration from the start of the slot until the block became available.
let available_delay =
Expand Down

0 comments on commit 958bac4

Please sign in to comment.