From fc7ab02aa20e47b387cb175defeea9786fdcbde4 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Sun, 31 Mar 2024 12:40:31 +0200 Subject: [PATCH 1/3] ci: Run clippy with signaling feature enabled --- .github/workflows/code.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml index ebd7e612..b5039e89 100644 --- a/.github/workflows/code.yml +++ b/.github/workflows/code.yml @@ -94,7 +94,7 @@ jobs: uses: Swatinem/rust-cache@v2.7.3 - name: Run cargo clippy - run: cargo clippy --all-targets -- -D warnings + run: cargo clippy --features signaling --all-targets -- -D warnings lint-wasm: name: Clippy wasm From a24b51e1081ac794aa14656895b8512cf6a1e722 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Sun, 31 Mar 2024 12:47:41 +0200 Subject: [PATCH 2/3] chore: Fix new dead_code warning in signaling module --- bevy_matchbox/src/signaling.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/bevy_matchbox/src/signaling.rs b/bevy_matchbox/src/signaling.rs index ea02a61c..a585391e 100644 --- a/bevy_matchbox/src/signaling.rs +++ b/bevy_matchbox/src/signaling.rs @@ -64,6 +64,7 @@ use std::net::SocketAddr; /// } /// ``` #[derive(Debug, Resource)] +#[allow(dead_code)] // we take ownership of the task to not drop it pub struct MatchboxServer(Task>); impl From> for MatchboxServer From 3ae4f6e96ea65b2aa63db7720ecfbfc4df7e9f70 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Sun, 31 Mar 2024 12:48:03 +0200 Subject: [PATCH 3/3] Fix clippy warning --- bevy_matchbox/src/signaling.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bevy_matchbox/src/signaling.rs b/bevy_matchbox/src/signaling.rs index a585391e..47f6f06a 100644 --- a/bevy_matchbox/src/signaling.rs +++ b/bevy_matchbox/src/signaling.rs @@ -176,7 +176,7 @@ mod tests { ) .into(); - commands.insert_resource(MatchboxServer::from(server)); + commands.insert_resource(server); } #[test]