Skip to content

Commit

Permalink
Add liftime to CustomizedExtArg
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainpelissier committed Apr 28, 2024
1 parent b5a420e commit e6b7b52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions digest/src/core_api/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ impl<T> CustomizedInit for CoreWrapper<T>
where
T: BufferKindUser + CustomizedInit,
{
type CustomizedExtArg = T::CustomizedExtArg;
type CustomizedExtArg<'a> = T::CustomizedExtArg<'a>;

#[inline]
fn new_customized(customization: &[u8]) -> Self {
Self::from_core(T::new_customized(customization))
}

#[inline]
fn new_ext_customized(customization_ext: &Self::CustomizedExtArg) -> Self {
fn new_ext_customized(customization_ext: &Self::CustomizedExtArg<'_>) -> Self {
Self::from_core(T::new_ext_customized(customization_ext))
}
}
Expand Down
4 changes: 2 additions & 2 deletions digest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,13 @@ pub trait CustomizedInit: Sized {
// associated type defaults are currently unstable

/// Extended customization
type CustomizedExtArg;
type CustomizedExtArg<'a>;

/// Create new hasher instance with the given customization string.
fn new_customized(customization: &[u8]) -> Self;

/// Create new hasher instance with the given extended customization.
fn new_ext_customized(customization_ext: &Self::CustomizedExtArg) -> Self;
fn new_ext_customized(customization_ext: &Self::CustomizedExtArg<'_>) -> Self;
}

/// The error type used in variable hash traits.
Expand Down

0 comments on commit e6b7b52

Please sign in to comment.