chore: update dependencies

This commit is contained in:
Michael Aaron Murphy 2024-01-18 16:02:32 +01:00 committed by Michael Murphy
parent 805bafd1b6
commit 8610b181f8
6 changed files with 282 additions and 80 deletions

View file

@ -10,10 +10,10 @@ cosmic-bg-config = { workspace = true }
cosmic-config = { workspace = true }
dirs = "5.0.1"
freedesktop-icons = "0.2.4"
futures-lite = "1.13.0"
image = "0.24.7"
futures-lite = "2.2.0"
image = "0.24.8"
infer = "0.15.0"
rayon = "1.8.0"
rayon = "1.8.1"
sctk = { workspace = true }
tokio = { version = "1.35.1", features = ["sync"] }
tracing = "0.1.40"

View file

@ -7,10 +7,10 @@ license = "GPL-3.0-only"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
byte-unit = { version = "4.0.19", default-features = false }
byte-unit = "5.1.3"
const_format = "0.2.32"
concat-in-place = "1.1.0"
sysinfo = "0.29.11"
sysinfo = "0.30.5"
memchr = "2.7.1"
[dependencies.bumpalo]

View file

@ -3,7 +3,6 @@
use bumpalo::Bump;
use std::{ffi::OsStr, io::Read};
use sysinfo::{DiskExt, SystemExt};
use concat_in_place::strcat;
use const_format::concatcp;
@ -49,18 +48,18 @@ impl Info {
let mut sys = sysinfo::System::new();
sys.refresh_disks_list();
sys.refresh_disks();
let disks = sysinfo::Disks::new_with_refreshed_list();
sys.refresh_memory();
let mut total_capacity = 0;
for disk in sys.disks() {
for disk in disks.list() {
total_capacity += disk.total_space();
}
info.disk_capacity = format_size(total_capacity);
if let Some(name) = sys.host_name() {
if let Some(name) = sysinfo::System::host_name() {
info.device_name = name;
}
@ -210,7 +209,7 @@ pub fn read_to_string<'a, P: AsRef<OsStr>>(
}
fn format_size(size: u64) -> String {
byte_unit::Byte::from_bytes(size)
.get_appropriate_unit(true)
byte_unit::Byte::from_u64(size)
.get_appropriate_unit(byte_unit::UnitType::Decimal)
.to_string()
}