mirror of
https://github.com/nushell/nushell.git
synced 2025-05-29 06:17:54 +02:00
update sysinfo to 0.33.1 (#14982)
Noticed by #14951 , there are some breaking changes in sysinfo 0.33. So I create a pr manually to update it
This commit is contained in:
parent
4424481487
commit
30b3c42b37
23
Cargo.lock
generated
23
Cargo.lock
generated
@ -3516,7 +3516,7 @@ dependencies = [
|
||||
"percent-encoding",
|
||||
"reedline",
|
||||
"rstest",
|
||||
"sysinfo 0.32.1",
|
||||
"sysinfo",
|
||||
"tempfile",
|
||||
"unicode-segmentation",
|
||||
"uuid",
|
||||
@ -3682,7 +3682,7 @@ dependencies = [
|
||||
"serde_urlencoded",
|
||||
"serde_yaml",
|
||||
"sha2",
|
||||
"sysinfo 0.32.1",
|
||||
"sysinfo",
|
||||
"tabled",
|
||||
"tempfile",
|
||||
"titlecase",
|
||||
@ -3975,7 +3975,7 @@ dependencies = [
|
||||
"nix 0.29.0",
|
||||
"ntapi",
|
||||
"procfs",
|
||||
"sysinfo 0.32.1",
|
||||
"sysinfo",
|
||||
"web-time",
|
||||
"windows 0.56.0",
|
||||
]
|
||||
@ -5365,7 +5365,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"stacker",
|
||||
"sysinfo 0.33.1",
|
||||
"sysinfo",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
@ -6934,20 +6934,6 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sysinfo"
|
||||
version = "0.32.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c33cd241af0f2e9e3b5c32163b873b29956890b5342e6745b917ce9d490f4af"
|
||||
dependencies = [
|
||||
"core-foundation-sys",
|
||||
"libc",
|
||||
"memchr",
|
||||
"ntapi",
|
||||
"rayon",
|
||||
"windows 0.57.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sysinfo"
|
||||
version = "0.33.1"
|
||||
@ -6958,6 +6944,7 @@ dependencies = [
|
||||
"libc",
|
||||
"memchr",
|
||||
"ntapi",
|
||||
"rayon",
|
||||
"windows 0.57.0",
|
||||
]
|
||||
|
||||
|
@ -156,7 +156,7 @@ serde_yaml = "0.9.33"
|
||||
sha2 = "0.10"
|
||||
strip-ansi-escapes = "0.2.0"
|
||||
syn = "2.0"
|
||||
sysinfo = "0.32"
|
||||
sysinfo = "0.33"
|
||||
tabled = { version = "0.17.0", default-features = false }
|
||||
tempfile = "3.15"
|
||||
titlecase = "3.0"
|
||||
|
@ -54,7 +54,7 @@ impl Command for DebugInfo {
|
||||
}
|
||||
|
||||
fn all_columns(span: Span) -> Value {
|
||||
let rk = RefreshKind::new()
|
||||
let rk = RefreshKind::nothing()
|
||||
.with_processes(ProcessRefreshKind::everything())
|
||||
.with_memory(MemoryRefreshKind::everything());
|
||||
|
||||
|
@ -54,9 +54,9 @@ fn cpu(long: bool, span: Span) -> Value {
|
||||
// In theory we could just sleep MINIMUM_CPU_UPDATE_INTERVAL, but I've noticed that
|
||||
// that gives poor results (error of ~5%). Decided to wait 2x that long, somewhat arbitrarily
|
||||
std::thread::sleep(MINIMUM_CPU_UPDATE_INTERVAL * 2);
|
||||
sys.refresh_cpu_specifics(CpuRefreshKind::new().with_cpu_usage());
|
||||
sys.refresh_cpu_specifics(CpuRefreshKind::nothing().with_cpu_usage());
|
||||
} else {
|
||||
sys.refresh_cpu_specifics(CpuRefreshKind::new().with_frequency());
|
||||
sys.refresh_cpu_specifics(CpuRefreshKind::nothing().with_frequency());
|
||||
}
|
||||
|
||||
let cpus = sys
|
||||
|
@ -49,8 +49,8 @@ fn temp(span: Span) -> Value {
|
||||
.map(|component| {
|
||||
let mut record = record! {
|
||||
"unit" => Value::string(component.label(), span),
|
||||
"temp" => Value::float(component.temperature().into(), span),
|
||||
"high" => Value::float(component.max().into(), span),
|
||||
"temp" => Value::float(component.temperature().unwrap_or(f32::NAN).into(), span),
|
||||
"high" => Value::float(component.max().unwrap_or(f32::NAN).into(), span),
|
||||
};
|
||||
|
||||
if let Some(critical) = component.critical() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user