Skip to content

Commit 0b44330

Browse files
committed
bump sysinfo
1 parent bea5beb commit 0b44330

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Cargo.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -5270,16 +5270,16 @@ dependencies = [
52705270

52715271
[[package]]
52725272
name = "sysinfo"
5273-
version = "0.29.11"
5273+
version = "0.30.5"
52745274
source = "registry+https://github.com/rust-lang/crates.io-index"
5275-
checksum = "cd727fc423c2060f6c92d9534cef765c65a6ed3f428a03d7def74a8c4348e666"
5275+
checksum = "1fb4f3438c8f6389c864e61221cbc97e9bca98b4daf39a5beb7bea660f528bb2"
52765276
dependencies = [
52775277
"cfg-if",
52785278
"core-foundation-sys",
52795279
"libc",
52805280
"ntapi",
52815281
"once_cell",
5282-
"winapi",
5282+
"windows",
52835283
]
52845284

52855285
[[package]]

src/tools/opt-dist/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ log = "0.4"
1010
anyhow = { version = "1", features = ["backtrace"] }
1111
humantime = "2"
1212
humansize = "2"
13-
sysinfo = { version = "0.29", default-features = false }
13+
sysinfo = { version = "0.30", default-features = false }
1414
fs_extra = "1"
1515
camino = "1"
1616
reqwest = { version = "0.11", features = ["blocking"] }

src/tools/opt-dist/src/utils/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use sysinfo::{DiskExt, RefreshKind, System, SystemExt};
1+
use sysinfo::Disks;
22

33
use crate::environment::Environment;
44
use crate::timer::Timer;
@@ -15,9 +15,9 @@ pub fn format_env_variables() -> String {
1515
}
1616

1717
pub fn print_free_disk_space() -> anyhow::Result<()> {
18-
let sys = System::new_with_specifics(RefreshKind::default().with_disks_list().with_disks());
19-
let available_space: u64 = sys.disks().iter().map(|d| d.available_space()).sum();
20-
let total_space: u64 = sys.disks().iter().map(|d| d.total_space()).sum();
18+
let disks = Disks::new_with_refreshed_list();
19+
let available_space: u64 = disks.list().iter().map(|d| d.available_space()).sum();
20+
let total_space: u64 = disks.list().iter().map(|d| d.total_space()).sum();
2121
let used_space = total_space - available_space;
2222

2323
log::info!(

0 commit comments

Comments
 (0)