diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 5b973cb..99184d4 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -19,6 +19,15 @@ jobs: run: rustup update stable - name: Check formatting with cargo fmt run: cargo fmt --all -- --check + cargo-clippy: + name: cargo-clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Get latest version of stable Rust + run: rustup update stable + - name: Check code quality with cargo clippy + run: cargo clippy --all --all-features -- --deny warnings test: strategy: matrix: diff --git a/src/fixed_vector.rs b/src/fixed_vector.rs index bc9b747..3fe9e71 100644 --- a/src/fixed_vector.rs +++ b/src/fixed_vector.rs @@ -378,7 +378,7 @@ impl<'a, T: arbitrary::Arbitrary<'a>, N: 'static + Unsigned> arbitrary::Arbitrar for _ in 0..size { vec.push(::arbitrary(u)?); } - Ok(Self::new(vec).map_err(|_| arbitrary::Error::IncorrectFormat)?) + Self::new(vec).map_err(|_| arbitrary::Error::IncorrectFormat) } } diff --git a/src/variable_list.rs b/src/variable_list.rs index 1b4cc37..f98ba8f 100644 --- a/src/variable_list.rs +++ b/src/variable_list.rs @@ -369,7 +369,7 @@ impl<'a, T: arbitrary::Arbitrary<'a>, N: 'static + Unsigned> arbitrary::Arbitrar for _ in 0..size { vec.push(::arbitrary(u)?); } - Ok(Self::new(vec).map_err(|_| arbitrary::Error::IncorrectFormat)?) + Self::new(vec).map_err(|_| arbitrary::Error::IncorrectFormat) } }