commit d0f51fe0a14ea0513b66748cfa03a49410be74e7 from: witcher date: Fri Mar 10 18:59:16 2023 UTC Fix indentation commit - 252537987245126b023dce4bd53009fb5e19fb0e commit + d0f51fe0a14ea0513b66748cfa03a49410be74e7 blob - 60ab36366809a795e750e2ccc04f94b17386de4c blob + a53b94b516f924e04a2ccdc38d775e3eb89295b5 --- src/main.rs +++ src/main.rs @@ -143,7 +143,6 @@ impl ThroughputState { } } -// TODO: change interface of `Characteristic::new` of `ble_esp32c3` #[allow(clippy::needless_pass_by_value)] /// Function for handling the buffer write which updates the state. fn handle_buffer_write(payload: Vec) { @@ -216,15 +215,15 @@ fn main() { if passed > 0 { log::info!( - "Throughput: {} kbit/s ({} kbit/s momentary) (running {}s, {} packets lost)", - total_len - .saturating_mul(8) - .saturating_div(1000) - .saturating_div(passed.try_into().expect("Convert u64 to usize")), - momentary_len.saturating_mul(8).saturating_div(1000), - passed, - lost - ); + "Throughput: {} kbit/s ({} kbit/s momentary) (running {}s, {} packets lost)", + total_len + .saturating_mul(8) + .saturating_div(1000) + .saturating_div(passed.try_into().expect("Convert u64 to usize")), + momentary_len.saturating_mul(8).saturating_div(1000), + passed, + lost + ); } }, );