diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index bba6e00b7..60b98966f 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -26,7 +26,7 @@ jobs: - uses: RustCrypto/actions/cargo-cache@master - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.60.0 + toolchain: 1.71.0 components: clippy - run: cargo clippy --all --all-features -- -D warnings diff --git a/cipher/src/lib.rs b/cipher/src/lib.rs index 87041c19a..87813d940 100644 --- a/cipher/src/lib.rs +++ b/cipher/src/lib.rs @@ -12,6 +12,7 @@ html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg" )] #![warn(missing_docs, rust_2018_idioms)] +#![allow(clippy::needless_lifetimes)] pub use crypto_common; pub use inout; diff --git a/kem/tests/hpke.rs b/kem/tests/hpke.rs index 0b5d07b3f..43df15cd2 100644 --- a/kem/tests/hpke.rs +++ b/kem/tests/hpke.rs @@ -32,7 +32,7 @@ impl EncappedKey for X25519EncappedKey { type SenderPublicKey = X25519PublicKey; fn from_bytes(bytes: &GenericArray) -> Result { - Ok(X25519EncappedKey(bytes.clone())) + Ok(X25519EncappedKey(*bytes)) } } impl AsRef<[u8]> for X25519EncappedKey { diff --git a/password-hash/src/params.rs b/password-hash/src/params.rs index d0524e9f5..68648777e 100644 --- a/password-hash/src/params.rs +++ b/password-hash/src/params.rs @@ -362,7 +362,7 @@ mod tests { let mut params = ParamsString::new(); params.add_decimal(name, 1).unwrap(); - let err = params.add_decimal(name, 2u32.into()).err().unwrap(); + let err = params.add_decimal(name, 2u32).err().unwrap(); assert_eq!(err, Error::ParamNameDuplicated); } diff --git a/password-hash/tests/hashing.rs b/password-hash/tests/hashing.rs index ccb587324..7c53a72fc 100644 --- a/password-hash/tests/hashing.rs +++ b/password-hash/tests/hashing.rs @@ -57,7 +57,7 @@ impl<'a> TryFrom<&PasswordHash<'a>> for StubParams { } } -impl<'a> TryFrom for ParamsString { +impl TryFrom for ParamsString { type Error = Error; fn try_from(_: StubParams) -> Result { diff --git a/signature/tests/derive.rs b/signature/tests/derive.rs index 70e2dc0fc..e76408afd 100644 --- a/signature/tests/derive.rs +++ b/signature/tests/derive.rs @@ -35,9 +35,7 @@ impl TryFrom<&[u8]> for DummySignature { type Error = Error; fn try_from(bytes: &[u8]) -> Result { - Ok(DummySignature(GenericArray::clone_from_slice( - bytes.as_ref(), - ))) + Ok(DummySignature(GenericArray::clone_from_slice(bytes))) } }