From 0d5d9265a1b3d6699a709d22db44344c70748e30 Mon Sep 17 00:00:00 2001 From: KevFan Date: Fri, 5 Jan 2024 16:38:39 +0000 Subject: [PATCH] refactor: use x.first() instead of x.get(0) Clippy lint is failing due to https://rust-lang.github.io/rust-clippy/master/index.html#/get_first --- limitador-server/src/http_api/server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/limitador-server/src/http_api/server.rs b/limitador-server/src/http_api/server.rs index aad0c4e8..b528d5ab 100644 --- a/limitador-server/src/http_api/server.rs +++ b/limitador-server/src/http_api/server.rs @@ -266,7 +266,7 @@ mod tests { .to_request(); let resp_limits: Vec = test::call_and_read_body_json(&app, req).await; assert_eq!(resp_limits.len(), 1); - assert_eq!(*resp_limits.get(0).unwrap(), Limit::from(&limit)); + assert_eq!(*resp_limits.first().unwrap(), Limit::from(&limit)); } #[actix_rt::test]