Update sysinfo version to 0.34.0 (#18581)

Lot of improvements and stuff. You can see the full list
[here](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md).
:)
This commit is contained in:
Guillaume Gomez 2025-03-28 01:00:27 +01:00 committed by François Mockers
parent 5e8dec8a90
commit 67811be308
2 changed files with 3 additions and 4 deletions

View File

@ -77,14 +77,14 @@ log = { version = "0.4", default-features = false }
# macOS # macOS
[target.'cfg(all(target_os="macos"))'.dependencies] [target.'cfg(all(target_os="macos"))'.dependencies]
# Some features of sysinfo are not supported by apple. This will disable those features on apple devices # Some features of sysinfo are not supported by apple. This will disable those features on apple devices
sysinfo = { version = "0.33.0", optional = true, default-features = false, features = [ sysinfo = { version = "0.34.0", optional = true, default-features = false, features = [
"apple-app-store", "apple-app-store",
"system", "system",
] } ] }
# Only include when on linux/windows/android/freebsd # Only include when on linux/windows/android/freebsd
[target.'cfg(any(target_os = "linux", target_os = "windows", target_os = "android", target_os = "freebsd"))'.dependencies] [target.'cfg(any(target_os = "linux", target_os = "windows", target_os = "android", target_os = "freebsd"))'.dependencies]
sysinfo = { version = "0.33.0", optional = true, default-features = false, features = [ sysinfo = { version = "0.34.0", optional = true, default-features = false, features = [
"system", "system",
] } ] }

View File

@ -224,8 +224,7 @@ pub mod internal {
.first() .first()
.map(|cpu| cpu.brand().trim().to_string()) .map(|cpu| cpu.brand().trim().to_string())
.unwrap_or_else(|| String::from("not available")), .unwrap_or_else(|| String::from("not available")),
core_count: sys core_count: System::physical_core_count()
.physical_core_count()
.map(|x| x.to_string()) .map(|x| x.to_string())
.unwrap_or_else(|| String::from("not available")), .unwrap_or_else(|| String::from("not available")),
// Convert from Bytes to GibiBytes since it's probably what people expect most of the time // Convert from Bytes to GibiBytes since it's probably what people expect most of the time