Implement Send everywhere (#458)

This commit is contained in:
Pierre Krieger
2018-09-06 09:54:35 +02:00
committed by GitHub
parent bca1083d9c
commit ea1f172397
36 changed files with 367 additions and 232 deletions

View File

@ -59,9 +59,9 @@ use {SecioKeyPair, SecioKeyPairInner};
pub fn handshake<'a, S: 'a>(
socket: S,
local_key: SecioKeyPair,
) -> Box<Future<Item = (FullCodec<S>, PublicKey, Vec<u8>), Error = SecioError> + 'a>
) -> Box<Future<Item = (FullCodec<S>, PublicKey, Vec<u8>), Error = SecioError> + Send + 'a>
where
S: AsyncRead + AsyncWrite,
S: AsyncRead + AsyncWrite + Send,
{
// TODO: could be rewritten as a coroutine once coroutines land in stable Rust