mirror of https://github.com/fafhrd91/actix-net
Update actix-testing to tokio 0.2
This commit is contained in:
parent
99e0a45d0d
commit
77621e2d0e
|
@ -7,8 +7,7 @@ use actix_server::{Server, ServerBuilder, ServiceFactory};
|
||||||
pub use actix_server_config::{Io, ServerConfig};
|
pub use actix_server_config::{Io, ServerConfig};
|
||||||
|
|
||||||
use net2::TcpBuilder;
|
use net2::TcpBuilder;
|
||||||
use tokio::net::driver::Handle;
|
use tokio::net::TcpStream;
|
||||||
use tokio::net::tcp::TcpStream;
|
|
||||||
|
|
||||||
#[cfg(not(test))] // Work around for rust-lang/rust#62127
|
#[cfg(not(test))] // Work around for rust-lang/rust#62127
|
||||||
pub use actix_macros::test;
|
pub use actix_macros::test;
|
||||||
|
@ -141,7 +140,7 @@ impl TestServerRuntime {
|
||||||
|
|
||||||
/// Connect to server, return tokio TcpStream
|
/// Connect to server, return tokio TcpStream
|
||||||
pub fn connect(&self) -> std::io::Result<TcpStream> {
|
pub fn connect(&self) -> std::io::Result<TcpStream> {
|
||||||
TcpStream::from_std(net::TcpStream::connect(self.addr)?, &Handle::default())
|
TcpStream::from_std(net::TcpStream::connect(self.addr)?)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue