Skip to content

Commit

Permalink
Force Aead::AeadImpl to be Send + Sync (#61)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nox authored Jul 3, 2024
1 parent e9d2c26 commit af13275
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit af13275

Please sign in to comment.