From d4189a3972bf195bb680533beed8841b7bae0d33 Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Wed, 23 Jun 2021 14:08:44 +0200 Subject: [PATCH] fix: mark Boxed Future as Send The decrypt_chunk function is a function used by many higher level functions and crates. Without specifying the Send constraint, all async functions relying on this function will be non-Send. This shouldn't be dangerous, as the Boxed Future is actually Send-able as witnessed by the fact the compiler does not complain. --- src/self_encryptor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/self_encryptor.rs b/src/self_encryptor.rs index 80cb7cb11..9ce5c0d32 100644 --- a/src/self_encryptor.rs +++ b/src/self_encryptor.rs @@ -575,7 +575,7 @@ where async fn decrypt_chunk( state: &mut State, chunk_number: usize, -) -> Pin, SelfEncryptionError>>>> +) -> Pin, SelfEncryptionError>> + Send>> where S: Storage + 'static + Send + Sync + Clone, {