From 25586526ea91684f50262a0e38d36e9f40e427cf Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Sat, 22 Feb 2025 13:54:52 -0800 Subject: [PATCH] signature: Relax `Sized` requirements on async signer traits Follow up on https://github.com/RustCrypto/traits/pull/1765 --- signature/src/hazmat.rs | 4 ++-- signature/src/signer.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/signature/src/hazmat.rs b/signature/src/hazmat.rs index 25cc900a..075fc489 100644 --- a/signature/src/hazmat.rs +++ b/signature/src/hazmat.rs @@ -43,7 +43,7 @@ pub trait RandomizedPrehashSigner { /// /// Allowed lengths are algorithm-dependent and up to a particular /// implementation to decide. - fn sign_prehash_with_rng( + fn sign_prehash_with_rng( &self, rng: &mut R, prehash: &[u8], @@ -103,7 +103,7 @@ pub trait AsyncRandomizedPrehashSigner { /// /// Allowed lengths are algorithm-dependent and up to a particular /// implementation to decide. - async fn sign_prehash_with_rng_async( + async fn sign_prehash_with_rng_async( &self, rng: &mut R, prehash: &[u8], diff --git a/signature/src/signer.rs b/signature/src/signer.rs index 1ff23600..2b3fe9f1 100644 --- a/signature/src/signer.rs +++ b/signature/src/signer.rs @@ -201,7 +201,7 @@ where #[allow(async_fn_in_trait)] pub trait AsyncRandomizedSigner { /// Sign the given message and return a digital signature - async fn sign_with_rng_async(&self, rng: &mut R, msg: &[u8]) -> S { + async fn sign_with_rng_async(&self, rng: &mut R, msg: &[u8]) -> S { self.try_sign_with_rng_async(rng, msg) .await .expect("signature operation failed") @@ -212,7 +212,7 @@ pub trait AsyncRandomizedSigner { /// /// The main intended use case for signing errors is when communicating /// with external signers, e.g. cloud KMS, HSMs, or other hardware tokens. - async fn try_sign_with_rng_async( + async fn try_sign_with_rng_async( &self, rng: &mut R, msg: &[u8], @@ -224,7 +224,7 @@ impl AsyncRandomizedSigner for T where T: RandomizedSigner, { - async fn try_sign_with_rng_async( + async fn try_sign_with_rng_async( &self, rng: &mut R, msg: &[u8],