diff --git a/src/unix/apple/cpu.rs b/src/unix/apple/cpu.rs index 023e0b67d..2c39286e7 100644 --- a/src/unix/apple/cpu.rs +++ b/src/unix/apple/cpu.rs @@ -38,7 +38,8 @@ impl CpusWrapper { pub(crate) fn refresh(&mut self, refresh_kind: CpuRefreshKind, port: mach_port_t) { let need_cpu_usage_update = self .last_update - .is_some_and(|last_update| last_update.elapsed() > crate::MINIMUM_CPU_UPDATE_INTERVAL); + .map(|last_update| last_update.elapsed() > crate::MINIMUM_CPU_UPDATE_INTERVAL) + .unwrap_or(false); let cpus = &mut self.cpus; if cpus.is_empty() {