Merge pull request #43 from slowtec/fix-42

fix tokio import
pull/1/head
Daniel Abramov 6 years ago committed by GitHub
commit 8b3f811be7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/connect.rs

@ -70,7 +70,7 @@ mod encryption {
#[cfg(not(feature="tls"))] #[cfg(not(feature="tls"))]
mod encryption { mod encryption {
use futures::{future, Future}; use futures::{future, Future};
use tokio_io::{AsyncRead, AsyncWrite}; use tokio::io::{AsyncRead, AsyncWrite};
use tungstenite::Error; use tungstenite::Error;
use tungstenite::stream::Mode; use tungstenite::stream::Mode;
@ -78,9 +78,9 @@ mod encryption {
pub type AutoStream<S> = S; pub type AutoStream<S> = S;
pub fn wrap_stream<S>(socket: S, _domain: String, mode: Mode) pub fn wrap_stream<S>(socket: S, _domain: String, mode: Mode)
-> Box<Future<Item=AutoStream<S>, Error=Error>> -> Box<Future<Item=AutoStream<S>, Error=Error> + Send>
where where
S: 'static + AsyncRead + AsyncWrite, S: 'static + AsyncRead + AsyncWrite + Send,
{ {
match mode { match mode {
Mode::Plain => Box::new(future::ok(socket)), Mode::Plain => Box::new(future::ok(socket)),

Loading…
Cancel
Save