mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-09-23 01:38:37 +02:00
bug: change heim io fn to not bail on any error
This commit is contained in:
parent
105e9d27bb
commit
3843d63dbb
@ -72,7 +72,7 @@ pub async fn get_heim_io_usage_list(
|
||||
if get_physical {
|
||||
let mut physical_counter_stream = heim::disk::io_counters_physical();
|
||||
while let Some(io) = physical_counter_stream.next().await {
|
||||
let io = io?;
|
||||
if let Ok(io) = io {
|
||||
let mount_point = io.device_name().to_str().unwrap_or("Name Unavailable");
|
||||
io_hash.insert(
|
||||
mount_point.to_string(),
|
||||
@ -82,10 +82,11 @@ pub async fn get_heim_io_usage_list(
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let mut counter_stream = heim::disk::io_counters();
|
||||
while let Some(io) = counter_stream.next().await {
|
||||
let io = io?;
|
||||
if let Ok(io) = io {
|
||||
let mount_point = io.device_name().to_str().unwrap_or("Name Unavailable");
|
||||
io_hash.insert(
|
||||
mount_point.to_string(),
|
||||
@ -96,6 +97,7 @@ pub async fn get_heim_io_usage_list(
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(Some(io_hash))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user