From 9497990fb734a91b49ccf48204492cd14e228226 Mon Sep 17 00:00:00 2001 From: trivernis <trivernis@protonmail.com> Date: Sun, 7 Nov 2021 15:24:29 +0100 Subject: [PATCH] Add more restritions to protocol trait to be Send + Sync Signed-off-by: trivernis <trivernis@protonmail.com> --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/protocol/mod.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3e6172fe..f4b5ea82 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -511,7 +511,7 @@ dependencies = [ [[package]] name = "rmp-ipc" -version = "0.9.0" +version = "0.9.1" dependencies = [ "async-trait", "byteorder", diff --git a/Cargo.toml b/Cargo.toml index ca478c01..d8a0311f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rmp-ipc" -version = "0.9.0" +version = "0.9.1" authors = ["trivernis <trivernis@protonmail.com>"] edition = "2018" readme = "README.md" diff --git a/src/protocol/mod.rs b/src/protocol/mod.rs index 4837ac0f..6fa9c8b2 100644 --- a/src/protocol/mod.rs +++ b/src/protocol/mod.rs @@ -11,8 +11,8 @@ use tokio::io::{AsyncRead, AsyncWrite}; #[async_trait] pub trait AsyncStreamProtocolListener: Sized + Send + Sync { type AddressType: Clone + Debug + Send + Sync; - type RemoteAddressType: Debug; - type Stream: 'static + AsyncProtocolStream<AddressType = Self::AddressType>; + type RemoteAddressType: Debug + Send + Sync; + type Stream: 'static + AsyncProtocolStream<AddressType = Self::AddressType> + Send + Sync; async fn protocol_bind(address: Self::AddressType) -> IPCResult<Self>;