From 14e0dd481a0b35fe403f34c0b96c1329361f7492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 29 Jun 2020 13:07:00 +0300 Subject: [PATCH] Implement Send for IOStreamAsyncReadWrite --- src/gio.rs | 2 ++ src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gio.rs b/src/gio.rs index 114db7e..d8ab9db 100644 --- a/src/gio.rs +++ b/src/gio.rs @@ -69,6 +69,8 @@ pub struct IOStreamAsyncReadWrite> { write: gio::OutputStreamAsyncWrite, } +unsafe impl> Send for IOStreamAsyncReadWrite {} + impl> IOStreamAsyncReadWrite { /// Create a new `gio::IOStream` adapter fn new(stream: T) -> Result, T> { diff --git a/src/lib.rs b/src/lib.rs index 5a52e65..bd0aa91 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,7 +31,7 @@ unused_imports, unused_import_braces )] -#![forbid(unsafe_code)] +#![cfg_attr(not(feature = "gio-runtime"), forbid(unsafe_code))] pub use tungstenite;