mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-16 17:03:35 +00:00
bump sysinfo
This commit is contained in:
parent
bea5bebf3d
commit
0b44330c38
@ -5270,16 +5270,16 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sysinfo"
|
||||
version = "0.29.11"
|
||||
version = "0.30.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd727fc423c2060f6c92d9534cef765c65a6ed3f428a03d7def74a8c4348e666"
|
||||
checksum = "1fb4f3438c8f6389c864e61221cbc97e9bca98b4daf39a5beb7bea660f528bb2"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"core-foundation-sys",
|
||||
"libc",
|
||||
"ntapi",
|
||||
"once_cell",
|
||||
"winapi",
|
||||
"windows",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -10,7 +10,7 @@ log = "0.4"
|
||||
anyhow = { version = "1", features = ["backtrace"] }
|
||||
humantime = "2"
|
||||
humansize = "2"
|
||||
sysinfo = { version = "0.29", default-features = false }
|
||||
sysinfo = { version = "0.30", default-features = false }
|
||||
fs_extra = "1"
|
||||
camino = "1"
|
||||
reqwest = { version = "0.11", features = ["blocking"] }
|
||||
|
@ -1,4 +1,4 @@
|
||||
use sysinfo::{DiskExt, RefreshKind, System, SystemExt};
|
||||
use sysinfo::Disks;
|
||||
|
||||
use crate::environment::Environment;
|
||||
use crate::timer::Timer;
|
||||
@ -15,9 +15,9 @@ pub fn format_env_variables() -> String {
|
||||
}
|
||||
|
||||
pub fn print_free_disk_space() -> anyhow::Result<()> {
|
||||
let sys = System::new_with_specifics(RefreshKind::default().with_disks_list().with_disks());
|
||||
let available_space: u64 = sys.disks().iter().map(|d| d.available_space()).sum();
|
||||
let total_space: u64 = sys.disks().iter().map(|d| d.total_space()).sum();
|
||||
let disks = Disks::new_with_refreshed_list();
|
||||
let available_space: u64 = disks.list().iter().map(|d| d.available_space()).sum();
|
||||
let total_space: u64 = disks.list().iter().map(|d| d.total_space()).sum();
|
||||
let used_space = total_space - available_space;
|
||||
|
||||
log::info!(
|
||||
|
Loading…
Reference in New Issue
Block a user