gio: Add Send implementation to IOStreamAsyncReadWrite

This is a wrapper for GSocketConnection, which should be OK to share across
threads.
pull/38/head
Philippe Normand 4 years ago committed by Sebastian Dröge
parent 8738c887c0
commit be83431c2f
  1. 2
      src/gio.rs
  2. 1
      src/lib.rs

@ -69,6 +69,8 @@ pub struct IOStreamAsyncReadWrite<T: IsA<gio::IOStream>> {
write: gio::OutputStreamAsyncWrite<gio::PollableOutputStream>,
}
unsafe impl<T: IsA<gio::IOStream>> Send for IOStreamAsyncReadWrite<T> {}
impl<T: IsA<gio::IOStream>> IOStreamAsyncReadWrite<T> {
/// Create a new `gio::IOStream` adapter
pub fn new(stream: T) -> Result<IOStreamAsyncReadWrite<T>, T> {

@ -31,7 +31,6 @@
unused_imports,
unused_import_braces
)]
#![forbid(unsafe_code)]
pub use tungstenite;

Loading…
Cancel
Save