Skip to content

Commit 7bcd5d5

Browse files
Add liftime to CustomizedExtArg
1 parent b5a420e commit 7bcd5d5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

digest/src/core_api/wrapper.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,15 @@ impl<T> CustomizedInit for CoreWrapper<T>
165165
where
166166
T: BufferKindUser + CustomizedInit,
167167
{
168-
type CustomizedExtArg = T::CustomizedExtArg;
168+
type CustomizedExtArg<'a> = T::CustomizedExtArg<'a>;
169169

170170
#[inline]
171171
fn new_customized(customization: &[u8]) -> Self {
172172
Self::from_core(T::new_customized(customization))
173173
}
174174

175175
#[inline]
176-
fn new_ext_customized(customization_ext: &Self::CustomizedExtArg) -> Self {
176+
fn new_ext_customized<'a>(customization_ext: &Self::CustomizedExtArg<'a>) -> Self {
177177
Self::from_core(T::new_ext_customized(customization_ext))
178178
}
179179
}

digest/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,13 @@ pub trait CustomizedInit: Sized {
274274
// associated type defaults are currently unstable
275275

276276
/// Extended customization
277-
type CustomizedExtArg;
277+
type CustomizedExtArg<'a>;
278278

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

282282
/// Create new hasher instance with the given extended customization.
283-
fn new_ext_customized(customization_ext: &Self::CustomizedExtArg) -> Self;
283+
fn new_ext_customized<'a>(customization_ext: &Self::CustomizedExtArg<'a>) -> Self;
284284
}
285285

286286
/// The error type used in variable hash traits.

0 commit comments

Comments
 (0)