mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 06:44:35 +00:00
Fix Rust 1.88 clippy errors & execution engine tests (#7657)
Fix Rust 1.88 clippy errors.
This commit is contained in:
@@ -365,11 +365,7 @@ impl AttesterCache {
|
||||
value: AttesterCacheValue,
|
||||
) {
|
||||
while cache.len() >= MAX_CACHE_LEN {
|
||||
if let Some(oldest) = cache
|
||||
.iter()
|
||||
.map(|(key, _)| *key)
|
||||
.min_by_key(|key| key.epoch)
|
||||
{
|
||||
if let Some(oldest) = cache.keys().copied().min_by_key(|key| key.epoch) {
|
||||
cache.remove(&oldest);
|
||||
} else {
|
||||
break;
|
||||
|
||||
@@ -342,7 +342,7 @@ impl MonitoredValidator {
|
||||
|
||||
// Prune
|
||||
while summaries.len() > HISTORIC_EPOCHS {
|
||||
if let Some(key) = summaries.iter().map(|(epoch, _)| *epoch).min() {
|
||||
if let Some(key) = summaries.keys().copied().min() {
|
||||
summaries.remove(&key);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user