diff --git a/CHANGELOG.md b/CHANGELOG.md index b6e60de54..898aeec6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 0.32.0 + + * Add new `Disk::is_read_only` API. + * Add new `remove_dead_processes` argument to `System::refresh_processes` and `System::refresh_processes_specifics`. + * macOS: Fix memory leak in disk refresh. + # 0.31.4 * macOS: Force memory cleanup in disk list retrieval. diff --git a/Cargo.toml b/Cargo.toml index 2ca8c6dd2..249e90dab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sysinfo" -version = "0.31.4" +version = "0.32.0" authors = ["Guillaume Gomez "] description = "Library to get system information such as processes, CPUs, disks, components and networks" repository = "https://github.com/GuillaumeGomez/sysinfo" diff --git a/migration_guide.md b/migration_guide.md index 65558816a..f9b09daa8 100644 --- a/migration_guide.md +++ b/migration_guide.md @@ -1,5 +1,13 @@ # Migration guide +## 0.31 to 0.32 + +### Major changes + +`System::refresh_process` and `System::refresh_process_specifics` methods now take +an extra `remove_dead_processes` argument. When set to `true`, dead processes will +be removed. + ## 0.30 to 0.31 With this update, the minimum supported Rust version goes up to 1.74. diff --git a/src/unix/apple/system.rs b/src/unix/apple/system.rs index 2d5014f8c..44406f623 100644 --- a/src/unix/apple/system.rs +++ b/src/unix/apple/system.rs @@ -89,9 +89,9 @@ pub(crate) struct SystemInner { pub(crate) struct Wrap<'a>(pub UnsafeCell<&'a mut HashMap>); #[cfg(all(target_os = "macos", not(feature = "apple-sandbox")))] -unsafe impl<'a> Send for Wrap<'a> {} +unsafe impl Send for Wrap<'_> {} #[cfg(all(target_os = "macos", not(feature = "apple-sandbox")))] -unsafe impl<'a> Sync for Wrap<'a> {} +unsafe impl Sync for Wrap<'_> {} fn boot_time() -> u64 { let mut boot_time = timeval { diff --git a/src/unix/freebsd/utils.rs b/src/unix/freebsd/utils.rs index 7e6d00bfc..6aa611f01 100644 --- a/src/unix/freebsd/utils.rs +++ b/src/unix/freebsd/utils.rs @@ -223,9 +223,9 @@ pub(crate) struct WrapMap<'a>( ); #[cfg(feature = "system")] -unsafe impl<'a> Send for WrapMap<'a> {} +unsafe impl Send for WrapMap<'_> {} #[cfg(feature = "system")] -unsafe impl<'a> Sync for WrapMap<'a> {} +unsafe impl Sync for WrapMap<'_> {} #[cfg(feature = "system")] #[repr(transparent)] diff --git a/src/unix/linux/process.rs b/src/unix/linux/process.rs index cd2a5d056..c7c2307be 100644 --- a/src/unix/linux/process.rs +++ b/src/unix/linux/process.rs @@ -351,8 +351,8 @@ impl<'a, T> Wrap<'a, T> { } #[allow(clippy::non_send_fields_in_send_ty)] -unsafe impl<'a, T> Send for Wrap<'a, T> {} -unsafe impl<'a, T> Sync for Wrap<'a, T> {} +unsafe impl Send for Wrap<'_, T> {} +unsafe impl Sync for Wrap<'_, T> {} #[inline(always)] fn compute_start_time_without_boot_time(parts: &Parts<'_>, info: &SystemInfo) -> u64 {