diff --git a/Cargo.lock b/Cargo.lock index a3d91219e0..5ef32ca59c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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", ] diff --git a/Cargo.toml b/Cargo.toml index 350007a885..f4082f9e80 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/crates/nu-command/src/debug/info.rs b/crates/nu-command/src/debug/info.rs index 4912da8a1d..955381bdf2 100644 --- a/crates/nu-command/src/debug/info.rs +++ b/crates/nu-command/src/debug/info.rs @@ -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()); diff --git a/crates/nu-command/src/system/sys/cpu.rs b/crates/nu-command/src/system/sys/cpu.rs index de24efd898..09e6c836be 100644 --- a/crates/nu-command/src/system/sys/cpu.rs +++ b/crates/nu-command/src/system/sys/cpu.rs @@ -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 diff --git a/crates/nu-command/src/system/sys/temp.rs b/crates/nu-command/src/system/sys/temp.rs index e743779e84..b3d9d58bef 100644 --- a/crates/nu-command/src/system/sys/temp.rs +++ b/crates/nu-command/src/system/sys/temp.rs @@ -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() {