Accidentally left in some code that prevented the total rx/tx from being shown on windows... oops.

This commit is contained in:
ClementTsang 2020-02-09 22:25:47 -05:00
parent 8098e45dcf
commit dbc970abec

View file

@ -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,