Skip to content

Commit

Permalink
Fixup clippy & review nit
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoverbear authored and GuillaumeGomez committed Apr 2, 2024
1 parent ff24ff8 commit cac554a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ mod test {
}

#[test]
#[allow(clippy::const_is_empty)]
fn check_nb_supported_signals() {
if IS_SUPPORTED_SYSTEM {
assert!(
Expand Down
3 changes: 1 addition & 2 deletions src/unix/apple/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ impl CpusWrapper {
pub(crate) fn refresh(&mut self, refresh_kind: CpuRefreshKind, port: mach_port_t) {
let need_cpu_usage_update = self
.last_update
.map(|last_update| last_update.elapsed() > crate::MINIMUM_CPU_UPDATE_INTERVAL)
.unwrap_or(true);
.is_some_and(|last_update| last_update.elapsed() > crate::MINIMUM_CPU_UPDATE_INTERVAL);

let cpus = &mut self.cpus;
if cpus.is_empty() {
Expand Down

0 comments on commit cac554a

Please sign in to comment.