From 28eeae86b4dd3e82d3c5fd433b41a9ca0f67b880 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Fri, 8 Mar 2024 15:01:20 +0100 Subject: [PATCH] Remove nightly Rust clippy test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All PRs currently fail due to a Clippy lint: ``` warning: assigning the result of `Clone::clone()` may be inefficient --> mls-rs/src/tree_kem/tree_hash.rs:193:13 | 193 | filtered_sets[n] = filtered_sets[p as usize].clone(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `filtered_sets[n].clone_from(&filtered_sets[p as usize])` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones = note: `#[warn(clippy::assigning_clones)]` on by default ``` Trying to fix this as recommended results in a compilation error since we cannot call a mutating method on `filtered_sets` while we also read from it… In general, Nightly Rust is a moving target (moving faster much than stable) and as such, it’s inconvenient to have Clippy fail builds due to new (experimental) lints being enabled there. There are already two Clippy runs (using stable Rust) in the `native_build.yml` file, so I simply removed the unstable Rust run from `no_std__build.yml`. --- .github/workflows/no_std_build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/no_std_build.yml b/.github/workflows/no_std_build.yml index 83ef2c43..88676ffc 100644 --- a/.github/workflows/no_std_build.yml +++ b/.github/workflows/no_std_build.yml @@ -10,9 +10,6 @@ jobs: - uses: dtolnay/rust-toolchain@nightly with: targets: thumbv6m-none-eabi - components: clippy - - name: Clippy - run: cargo +nightly clippy --no-default-features -p mls-rs -- -D warnings - name: Test run: cargo +nightly test --no-default-features --features test_util --verbose -p mls-rs --lib --test '*' - name: Test Full RFC Compliance