diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index b70dad454..30a0da8f8 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -26,9 +26,9 @@ jobs: - uses: RustCrypto/actions/cargo-cache@master - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.71.0 + toolchain: 1.73.0 components: clippy - - run: cargo clippy --all --all-features -- -D warnings + - run: cargo clippy --all --all-features --tests -- -D warnings rustfmt: runs-on: ubuntu-latest diff --git a/elliptic-curve/src/hash2curve/hash2field/expand_msg/xmd.rs b/elliptic-curve/src/hash2curve/hash2field/expand_msg/xmd.rs index baf6f31b2..9cbd69832 100644 --- a/elliptic-curve/src/hash2curve/hash2field/expand_msg/xmd.rs +++ b/elliptic-curve/src/hash2curve/hash2field/expand_msg/xmd.rs @@ -199,6 +199,7 @@ mod test { } impl TestVector { + #[allow(clippy::panic_in_result_fn)] fn assert>( &self, dst: &'static [u8], diff --git a/elliptic-curve/src/hash2curve/hash2field/expand_msg/xof.rs b/elliptic-curve/src/hash2curve/hash2field/expand_msg/xof.rs index 9a5ff19e9..7ffed126b 100644 --- a/elliptic-curve/src/hash2curve/hash2field/expand_msg/xof.rs +++ b/elliptic-curve/src/hash2curve/hash2field/expand_msg/xof.rs @@ -71,12 +71,7 @@ mod test { use hex_literal::hex; use sha3::Shake128; - fn assert_message( - msg: &[u8], - domain: &Domain<'_, U32>, - len_in_bytes: u16, - bytes: &[u8], - ) { + fn assert_message(msg: &[u8], domain: &Domain<'_, U32>, len_in_bytes: u16, bytes: &[u8]) { let msg_len = msg.len(); assert_eq!(msg, &bytes[..msg_len]); @@ -102,12 +97,13 @@ mod test { } impl TestVector { + #[allow(clippy::panic_in_result_fn)] fn assert(&self, dst: &'static [u8], domain: &Domain<'_, U32>) -> Result<()> where HashT: Default + ExtendableOutput + Update, L: ArrayLength, { - assert_message::(self.msg, domain, L::to_u16(), self.msg_prime); + assert_message(self.msg, domain, L::to_u16(), self.msg_prime); let mut expander = ExpandMsgXof::::expand_message(&[self.msg], &[dst], L::to_usize())?; diff --git a/elliptic-curve/src/jwk.rs b/elliptic-curve/src/jwk.rs index e0233cc00..58a9e3812 100644 --- a/elliptic-curve/src/jwk.rs +++ b/elliptic-curve/src/jwk.rs @@ -565,6 +565,7 @@ fn decode_base64url_fe(s: &str) -> Result> { #[cfg(test)] mod tests { + #![allow(clippy::unwrap_used, clippy::panic)] use super::*; #[cfg(feature = "dev")] @@ -656,7 +657,7 @@ mod tests { let point = jwk.to_encoded_point::().unwrap(); let (x, y) = match point.coordinates() { Coordinates::Uncompressed { x, y } => (x, y), - other => panic!("unexpected coordinates: {:?}", other), + other => panic!("unexpected coordinates: {other:?}"), }; assert_eq!(&decode_base64url_fe::(&jwk.x).unwrap(), x);