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 From 8268b826cc45f5b2bd31b72339cc310789ab22d4 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Mon, 17 Jun 2024 10:29:29 +0200 Subject: docs --- src/routes/start.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/routes') diff --git a/src/routes/start.rs b/src/routes/start.rs index 0b6b38b..e9436f1 100644 --- a/src/routes/start.rs +++ b/src/routes/start.rs @@ -16,7 +16,7 @@ use uuid::Uuid; path = "/start/{id}", request_body = Option, responses( - (status = 200, description = "start the device with the given id", body = [Response]) + (status = 200, description = "start device with the given id", body = [Response]) ), params( ("id" = String, Path, description = "device id") -- cgit v1.2.3