mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 22:34:45 +00:00
Rust 1.85 lints (#7019)
N/A 2 changes: 1. Replace Option::map_or(true, ...) with is_none_or(...) 2. Remove unnecessary `Into::into` blocks where the type conversion is apparent from the types
This commit is contained in:
@@ -173,7 +173,7 @@ impl BlockTimesCache {
|
||||
if block_times
|
||||
.timestamps
|
||||
.all_blobs_observed
|
||||
.map_or(true, |prev| timestamp > prev)
|
||||
.is_none_or(|prev| timestamp > prev)
|
||||
{
|
||||
block_times.timestamps.all_blobs_observed = Some(timestamp);
|
||||
}
|
||||
@@ -195,7 +195,7 @@ impl BlockTimesCache {
|
||||
.entry(block_root)
|
||||
.or_insert_with(|| BlockTimesCacheValue::new(slot));
|
||||
let existing_timestamp = field(&mut block_times.timestamps);
|
||||
if existing_timestamp.map_or(true, |prev| timestamp < prev) {
|
||||
if existing_timestamp.is_none_or(|prev| timestamp < prev) {
|
||||
*existing_timestamp = Some(timestamp);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user