From af132759d30bf30dcc10f4bf05014ea96ad971de Mon Sep 17 00:00:00 2001 From: Anthony Ramine <123095+nox@users.noreply.github.com> Date: Wed, 3 Jul 2024 16:46:44 +0200 Subject: [PATCH] Force Aead::AeadImpl to be Send + Sync (#61) When trying to use AeadCtxR/AeadCtxS in a generic context which requires Send or Sync, downstream users need to add a bound to Aead::AeadImpl even though this is a doc(hidden) item and thus an implementation detail that may change afterwards. All implementations of Aead provide an AeadImpl type that is already Send + Sync so it doesn't hurt to add a trait bound there. --- src/aead.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aead.rs b/src/aead.rs index a927db4..6fcddef 100644 --- a/src/aead.rs +++ b/src/aead.rs @@ -19,7 +19,7 @@ use zeroize::Zeroize; pub trait Aead { /// The underlying AEAD implementation #[doc(hidden)] - type AeadImpl: BaseAeadCore + BaseAeadInPlace + BaseKeyInit + Clone; + type AeadImpl: BaseAeadCore + BaseAeadInPlace + BaseKeyInit + Clone + Send + Sync; /// The algorithm identifier for an AEAD implementation const AEAD_ID: u16;