From cd2895a1681a0ee5a956c19816163d7def812704 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 11 Mar 2024 17:45:06 +0100 Subject: [PATCH 1/2] CI: make clippy check cfg(test) code, tests & examples --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8f7942..62f05dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,4 +49,4 @@ jobs: run: cargo fmt --all -- --check - name: Lint code - run: cargo clippy --workspace -- -D warnings + run: cargo clippy --workspace --all-targets -- -D warnings From 49990d2530c7609ebfec7f9f8211c59b74e21842 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 11 Mar 2024 17:45:34 +0100 Subject: [PATCH 2/2] fix previously undetected clippy warning --- packages/dns-test/src/container/network.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/dns-test/src/container/network.rs b/packages/dns-test/src/container/network.rs index 6c1751c..ebe9c6d 100644 --- a/packages/dns-test/src/container/network.rs +++ b/packages/dns-test/src/container/network.rs @@ -124,11 +124,7 @@ mod tests { let output = command.output().expect("Failed to get output"); let stdout = String::from_utf8_lossy(&output.stdout); - stdout - .trim() - .lines() - .find(|line| line == &network_name) - .is_some() + stdout.trim().lines().any(|line| line == network_name) } #[test]