From fb4a899d06c0f25ac5cc8c3b5e6920fb6befbb72 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Fri, 27 Oct 2023 12:24:01 -0600 Subject: [PATCH] cipher: remove needless lifetime from `encrypt_padded_inout` One of the lifetimes is unused, but we couldn't remove it before because it would be a breaking change. Closes #1336 --- cipher/src/block.rs | 4 ++-- cipher/src/lib.rs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cipher/src/block.rs b/cipher/src/block.rs index 7b8c99cf9..43812ee4d 100644 --- a/cipher/src/block.rs +++ b/cipher/src/block.rs @@ -135,9 +135,9 @@ pub trait BlockEncrypt: BlockSizeUser + Sized { #[cfg(feature = "block-padding")] #[cfg_attr(docsrs, doc(cfg(feature = "block-padding")))] #[inline] - fn encrypt_padded_inout<'inp, 'out, P: Padding>( + fn encrypt_padded_inout<'out, P: Padding>( &self, - data: InOutBufReserved<'inp, 'out, u8>, + data: InOutBufReserved<'_, 'out, u8>, ) -> Result<&'out [u8], PadError> { let mut buf = data.into_padded_blocks::()?; self.encrypt_blocks_inout(buf.get_blocks()); diff --git a/cipher/src/lib.rs b/cipher/src/lib.rs index a8af951b8..fc476b626 100644 --- a/cipher/src/lib.rs +++ b/cipher/src/lib.rs @@ -11,8 +11,7 @@ html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg", html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg" )] -#![warn(missing_docs, rust_2018_idioms)] -#![allow(clippy::needless_lifetimes)] +#![warn(missing_docs, rust_2018_idioms, unused_lifetimes)] pub use crypto_common; pub use inout;