mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Update MSRV from 1.92 to 1.95 (#8348)
No particular reason --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -160,16 +160,14 @@ where
|
||||
while self.values.len() > self.max_len {
|
||||
self.values.pop_front();
|
||||
}
|
||||
while self.values.len() > self.min_len {
|
||||
if let Some((front_time, _)) = self.values.front() {
|
||||
if *front_time < now - (self.max_age as f64) {
|
||||
self.values.pop_front();
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let oldest_allowed_time = now - self.max_age as f64;
|
||||
while self.min_len < self.values.len()
|
||||
&& self
|
||||
.values
|
||||
.pop_front_if(|&mut (front_time, _)| front_time < oldest_allowed_time)
|
||||
.is_some()
|
||||
{
|
||||
// Keep popping while the oldest sample is too old.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user