From 5c613fb1e8ba3b039ba8ea3941fbadc8c8e8a29a Mon Sep 17 00:00:00 2001 From: Alex Snaps Date: Tue, 19 Sep 2023 15:20:49 -0400 Subject: [PATCH] Clippy on all targets --- .github/workflows/rust.yml | 2 +- limitador/tests/integration_tests.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 24e66682..92bda4b7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -93,7 +93,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: clippy - args: --all-features -- -D warnings + args: --all-features --all-targets -- -D warnings bench: name: Bench diff --git a/limitador/tests/integration_tests.rs b/limitador/tests/integration_tests.rs index e6218279..d300c46f 100644 --- a/limitador/tests/integration_tests.rs +++ b/limitador/tests/integration_tests.rs @@ -9,7 +9,7 @@ macro_rules! test_with_all_storage_impls { #[tokio::test] async fn [<$function _in_memory_storage>]() { let rate_limiter = - RateLimiter::new_with_storage(Box::new(InMemoryStorage::default())); + RateLimiter::new_with_storage(Box::::default()); $function(&mut TestsLimiter::new_from_blocking_impl(rate_limiter)).await; } @@ -205,7 +205,7 @@ mod test { vec!["app_id"], ); - for limit in vec![&lim1, &lim2].iter() { + for limit in [&lim1, &lim2] { rate_limiter.add_limit(limit).await; } rate_limiter.delete_limit(&lim2).await.unwrap();