Skip to content

Commit

Permalink
cipher: remove needless lifetime from encrypt_padded_inout
Browse files Browse the repository at this point in the history
One of the lifetimes is unused, but we couldn't remove it before because
it would be a breaking change.

Closes #1336
  • Loading branch information
tarcieri committed Oct 27, 2023
1 parent 102d328 commit fb4a899
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cipher/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self::BlockSize>>(
fn encrypt_padded_inout<'out, P: Padding<Self::BlockSize>>(
&self,
data: InOutBufReserved<'inp, 'out, u8>,
data: InOutBufReserved<'_, 'out, u8>,
) -> Result<&'out [u8], PadError> {
let mut buf = data.into_padded_blocks::<P, Self::BlockSize>()?;
self.encrypt_blocks_inout(buf.get_blocks());
Expand Down
3 changes: 1 addition & 2 deletions cipher/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fb4a899

Please sign in to comment.