From e6b7b523c26f8bb428b4c7cffe0bd535db0ef06b Mon Sep 17 00:00:00 2001 From: Sylvain Pelissier Date: Sun, 28 Apr 2024 18:49:08 +0200 Subject: [PATCH] Add liftime to CustomizedExtArg --- digest/src/core_api/wrapper.rs | 4 ++-- digest/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/digest/src/core_api/wrapper.rs b/digest/src/core_api/wrapper.rs index 9b72e223..48f7f996 100644 --- a/digest/src/core_api/wrapper.rs +++ b/digest/src/core_api/wrapper.rs @@ -165,7 +165,7 @@ impl CustomizedInit for CoreWrapper where T: BufferKindUser + CustomizedInit, { - type CustomizedExtArg = T::CustomizedExtArg; + type CustomizedExtArg<'a> = T::CustomizedExtArg<'a>; #[inline] fn new_customized(customization: &[u8]) -> Self { @@ -173,7 +173,7 @@ where } #[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)) } } diff --git a/digest/src/lib.rs b/digest/src/lib.rs index e129f4e5..36c1a397 100644 --- a/digest/src/lib.rs +++ b/digest/src/lib.rs @@ -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.