From c124f9fff690a42ea5fb490e4c7e512ba8448951 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Thu, 13 Jun 2024 16:54:35 +0200 Subject: cargo update + `time` update, fix for `Instant` deprecation --- src/routes/start.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/routes') diff --git a/src/routes/start.rs b/src/routes/start.rs index 192a54a..0b6b38b 100644 --- a/src/routes/start.rs +++ b/src/routes/start.rs @@ -128,14 +128,14 @@ fn setup_ping(state: Arc, device: Device) -> String { uuid_ret } -fn get_eta(times: Option>) -> i64 { +fn get_eta(times: Option>) -> u64 { let times = if let Some(times) = times { times } else { vec![0] }; - times.iter().sum::() / i64::try_from(times.len()).unwrap() + times.iter().sum::() / u64::try_from(times.len()).unwrap() } #[derive(Deserialize, ToSchema)] -- cgit v1.2.3