mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-22 05:04:39 +02:00
Update dependencies
This commit is contained in:
parent
b9b7d61a99
commit
9913cc9fda
16
Cargo.toml
16
Cargo.toml
@ -15,25 +15,23 @@ name = "btm"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
chrono = "0.4.9"
|
||||
chrono = "0.4.10"
|
||||
clap = "2.33.0"
|
||||
crossterm = "0.13"
|
||||
failure = "0.1.5"
|
||||
futures-preview = "0.3.0-alpha.18"
|
||||
failure = "0.1.6"
|
||||
fern = "0.5"
|
||||
futures-timer = "0.3"
|
||||
futures-util = "0.2.1"
|
||||
heim = "0.0.7"
|
||||
heim-common = "0.0.7"
|
||||
futures-preview = "0.3.0-alpha.18"
|
||||
heim = "0.0.8"
|
||||
log = "0.4"
|
||||
rayon = "1.2"
|
||||
regex = "1.3.1"
|
||||
sysinfo = "0.9.4"
|
||||
tokio = "0.2.0-alpha.4"
|
||||
sysinfo = "0.10.0"
|
||||
tokio = "0.2.4"
|
||||
winapi = "0.3.8"
|
||||
|
||||
[dependencies.tui]
|
||||
git = "https://github.com/ClementTsang/tui-rs"
|
||||
# git = "https://github.com/ClementTsang/tui-rs"
|
||||
# path = "../tui-rs"
|
||||
version = "0.7"
|
||||
default-features = false
|
||||
|
@ -1,4 +1,5 @@
|
||||
use heim_common::prelude::StreamExt;
|
||||
use futures::StreamExt;
|
||||
use heim::units::information;
|
||||
use std::time::Instant;
|
||||
|
||||
#[derive(Clone, Default)]
|
||||
@ -34,13 +35,12 @@ pub async fn get_io_usage_list(get_physical : bool) -> crate::utils::error::Resu
|
||||
mount_point.to_string(),
|
||||
IOData {
|
||||
mount_point: Box::from(mount_point),
|
||||
read_bytes : io.read_bytes().get::<heim_common::units::information::megabyte>(),
|
||||
write_bytes : io.write_bytes().get::<heim_common::units::information::megabyte>(),
|
||||
read_bytes: io.read_bytes().get::<information::megabyte>(),
|
||||
write_bytes: io.write_bytes().get::<information::megabyte>(),
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
let mut counter_stream = heim::disk::io_counters();
|
||||
while let Some(io) = counter_stream.next().await {
|
||||
let io = io?;
|
||||
@ -49,8 +49,8 @@ pub async fn get_io_usage_list(get_physical : bool) -> crate::utils::error::Resu
|
||||
mount_point.to_string(),
|
||||
IOData {
|
||||
mount_point: Box::from(mount_point),
|
||||
read_bytes : io.read_bytes().get::<heim_common::units::information::byte>(),
|
||||
write_bytes : io.write_bytes().get::<heim_common::units::information::byte>(),
|
||||
read_bytes: io.read_bytes().get::<information::byte>(),
|
||||
write_bytes: io.write_bytes().get::<information::byte>(),
|
||||
},
|
||||
);
|
||||
}
|
||||
@ -72,9 +72,9 @@ pub async fn get_disk_usage_list() -> crate::utils::error::Result<Vec<DiskData>>
|
||||
let usage = heim::disk::usage(partition.mount_point().to_path_buf()).await?;
|
||||
|
||||
vec_disks.push(DiskData {
|
||||
free_space : usage.free().get::<heim_common::units::information::megabyte>(),
|
||||
used_space : usage.used().get::<heim_common::units::information::megabyte>(),
|
||||
total_space : usage.total().get::<heim_common::units::information::megabyte>(),
|
||||
free_space: usage.free().get::<information::megabyte>(),
|
||||
used_space: usage.used().get::<information::megabyte>(),
|
||||
total_space: usage.total().get::<information::megabyte>(),
|
||||
mount_point: Box::from(partition.mount_point().to_str().unwrap_or("Name Unavailable")),
|
||||
name: Box::from(
|
||||
partition
|
||||
@ -90,11 +90,9 @@ pub async fn get_disk_usage_list() -> crate::utils::error::Result<Vec<DiskData>>
|
||||
vec_disks.sort_by(|a, b| {
|
||||
if a.name < b.name {
|
||||
std::cmp::Ordering::Less
|
||||
}
|
||||
else if a.name > b.name {
|
||||
} else if a.name > b.name {
|
||||
std::cmp::Ordering::Greater
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
std::cmp::Ordering::Equal
|
||||
}
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
use heim_common::units::information;
|
||||
use heim::units::information;
|
||||
use std::time::Instant;
|
||||
|
||||
#[derive(Clone)]
|
||||
|
@ -1,4 +1,5 @@
|
||||
use heim_common::{prelude::StreamExt, units::thermodynamic_temperature};
|
||||
use futures::StreamExt;
|
||||
use heim::units::thermodynamic_temperature;
|
||||
use sysinfo::{ComponentExt, System, SystemExt};
|
||||
|
||||
#[derive(Clone)]
|
||||
@ -37,8 +38,7 @@ pub async fn get_temperature_data(sys : &System, temp_type : &TemperatureType) -
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
else if cfg!(target_os = "windows") {
|
||||
} else if cfg!(target_os = "windows") {
|
||||
let sensor_data = sys.get_components_list();
|
||||
for component in sensor_data {
|
||||
temperature_vec.push(TempData {
|
||||
@ -58,11 +58,9 @@ pub async fn get_temperature_data(sys : &System, temp_type : &TemperatureType) -
|
||||
temperature_vec.sort_by(|a, b| {
|
||||
if a.temperature > b.temperature {
|
||||
std::cmp::Ordering::Less
|
||||
}
|
||||
else if a.temperature < b.temperature {
|
||||
} else if a.temperature < b.temperature {
|
||||
std::cmp::Ordering::Greater
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
std::cmp::Ordering::Equal
|
||||
}
|
||||
});
|
||||
@ -70,11 +68,9 @@ pub async fn get_temperature_data(sys : &System, temp_type : &TemperatureType) -
|
||||
temperature_vec.sort_by(|a, b| {
|
||||
if a.component_name > b.component_name {
|
||||
std::cmp::Ordering::Greater
|
||||
}
|
||||
else if a.component_name < b.component_name {
|
||||
} else if a.component_name < b.component_name {
|
||||
std::cmp::Ordering::Less
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
std::cmp::Ordering::Equal
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user