From 614cd28686438a6c6ace0b6643ec23c65ad1a7c9 Mon Sep 17 00:00:00 2001 From: pv42 Date: Mon, 26 Aug 2024 00:03:23 +0200 Subject: [PATCH] fix: remove redundant feature gate test: add signing to internal-tests matrix test: add signing as msrv matrix option --- .github/workflows/test.yml | 8 ++++++-- mavlink-core/src/connection/udp.rs | 3 --- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 08992a9375..071df1ef7b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,11 +30,12 @@ jobs: strategy: matrix: dialect: ["ardupilotmega", "asluav", "matrixpilot", "minimal", "paparazzi", "python_array_test", "slugs", "standard", "test", "ualberta", "uavionix", "icarous", "common"] + signing: ["", "--features signing"] steps: - uses: actions/checkout@master - uses: dtolnay/rust-toolchain@stable - name: Run internal tests - run: cargo test --verbose --features ${{ matrix.dialect }} --features signing -- --nocapture + run: cargo test --verbose --features ${{ matrix.dialect }} ${{ matrix.signing }} -- --nocapture mavlink-dump: runs-on: ubuntu-latest @@ -46,6 +47,9 @@ jobs: msrv: runs-on: ubuntu-latest + strategy: + matrix: + signing: ["", "--features signing"] steps: - uses: actions/checkout@master - uses: dtolnay/rust-toolchain@master @@ -59,7 +63,7 @@ jobs: with: use-cross: true command: check - args: --all --all-targets --features signing + args: --all --all-targets ${{ matrix.signing }} build: needs: [formatting, linting, internal-tests, mavlink-dump, msrv] diff --git a/mavlink-core/src/connection/udp.rs b/mavlink-core/src/connection/udp.rs index d2058fc896..6a4c75defe 100644 --- a/mavlink-core/src/connection/udp.rs +++ b/mavlink-core/src/connection/udp.rs @@ -166,8 +166,6 @@ impl MavConnection for UdpConnection { self.protocol_version, header, data, - #[cfg(feature = "signing")] - self.signing_data.as_ref(), )?; #[cfg(feature = "signing")] write_versioned_msg_signed( @@ -175,7 +173,6 @@ impl MavConnection for UdpConnection { self.protocol_version, header, data, - #[cfg(feature = "signing")] self.signing_data.as_ref(), )?; state.socket.send_to(&buf, addr)?