mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-14 08:27:07 +00:00
Accidentally left in some code that prevented the total rx/tx from being shown on windows... oops.
This commit is contained in:
parent
8098e45dcf
commit
dbc970abec
1 changed files with 8 additions and 16 deletions
|
@ -279,26 +279,18 @@ pub fn convert_network_data_points(
|
||||||
rx_converted_result = get_exact_byte_values(current_data.network_harvest.rx, false);
|
rx_converted_result = get_exact_byte_values(current_data.network_harvest.rx, false);
|
||||||
total_rx_converted_result = get_exact_byte_values(current_data.network_harvest.total_rx, false);
|
total_rx_converted_result = get_exact_byte_values(current_data.network_harvest.total_rx, false);
|
||||||
let rx_display = format!("{:.*}{}", 1, rx_converted_result.0, rx_converted_result.1);
|
let rx_display = format!("{:.*}{}", 1, rx_converted_result.0, rx_converted_result.1);
|
||||||
let total_rx_display = if cfg!(not(target_os = "windows")) {
|
let total_rx_display = format!(
|
||||||
format!(
|
"{:.*}{}",
|
||||||
"{:.*}{}",
|
1, total_rx_converted_result.0, total_rx_converted_result.1
|
||||||
1, total_rx_converted_result.0, total_rx_converted_result.1
|
);
|
||||||
)
|
|
||||||
} else {
|
|
||||||
"N/A".to_string()
|
|
||||||
};
|
|
||||||
|
|
||||||
tx_converted_result = get_exact_byte_values(current_data.network_harvest.tx, false);
|
tx_converted_result = get_exact_byte_values(current_data.network_harvest.tx, false);
|
||||||
total_tx_converted_result = get_exact_byte_values(current_data.network_harvest.total_tx, false);
|
total_tx_converted_result = get_exact_byte_values(current_data.network_harvest.total_tx, false);
|
||||||
let tx_display = format!("{:.*}{}", 1, tx_converted_result.0, tx_converted_result.1);
|
let tx_display = format!("{:.*}{}", 1, tx_converted_result.0, tx_converted_result.1);
|
||||||
let total_tx_display = if cfg!(not(target_os = "windows")) {
|
let total_tx_display = format!(
|
||||||
format!(
|
"{:.*}{}",
|
||||||
"{:.*}{}",
|
1, total_tx_converted_result.0, total_tx_converted_result.1
|
||||||
1, total_tx_converted_result.0, total_tx_converted_result.1
|
);
|
||||||
)
|
|
||||||
} else {
|
|
||||||
"N/A".to_string()
|
|
||||||
};
|
|
||||||
|
|
||||||
ConvertedNetworkData {
|
ConvertedNetworkData {
|
||||||
rx,
|
rx,
|
||||||
|
|
Loading…
Reference in a new issue