Skip to content

Commit

Permalink
Merge pull request #1238 from GuillaumeGomez/update
Browse files Browse the repository at this point in the history
Update CHANGELOG and crate version to 0.30.8
  • Loading branch information
GuillaumeGomez committed Apr 2, 2024
2 parents 8126e28 + 23d07be commit fe30f16
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 0.30.8

* Linux: Fix missing parallelization.
* Linux: Add `cargo` feature flag `linux-tmpfs` to list `tmpfs` mounts.
* macOS: Fix CPU usage returning `NaN`.
* `Components::refresh` is now parallelized.

# 0.30.7

* Linux: Fix cgroup memory computation.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sysinfo"
version = "0.30.7"
version = "0.30.8"
authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"]
description = "Library to get system information such as processes, CPUs, disks, components and networks"
repository = "https://github.com/GuillaumeGomez/sysinfo"
Expand Down
3 changes: 2 additions & 1 deletion src/unix/apple/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 2 additions & 0 deletions src/unix/apple/macos/process.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file.

#![allow(clippy::assigning_clones)]

use std::mem::{self, MaybeUninit};
use std::path::{Path, PathBuf};

Expand Down
1 change: 1 addition & 0 deletions src/unix/freebsd/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ impl SystemInner {
}
}

#[allow(clippy::assigning_clones)]
unsafe fn add_missing_proc_info(
system_info: &mut SystemInfo,
kproc: &libc::kinfo_proc,
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ impl CpusWrapper {
}
}

#[allow(clippy::assigning_clones)]
pub(crate) fn refresh(&mut self, only_update_global_cpu: bool, refresh_kind: CpuRefreshKind) {
let need_cpu_usage_update = self
.last_update
Expand Down

0 comments on commit fe30f16

Please sign in to comment.