From be83431c2fbae2d083e4da8f9275910a17e52bb7 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Fri, 19 Jun 2020 11:09:52 +0100 Subject: [PATCH] gio: Add Send implementation to IOStreamAsyncReadWrite This is a wrapper for GSocketConnection, which should be OK to share across threads. --- src/gio.rs | 2 ++ src/lib.rs | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gio.rs b/src/gio.rs index 2ca16b7..1930faa 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 pub fn new(stream: T) -> Result, T> { diff --git a/src/lib.rs b/src/lib.rs index 5a52e65..1ea658d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,7 +31,6 @@ unused_imports, unused_import_braces )] -#![forbid(unsafe_code)] pub use tungstenite;