mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-28 07:30:36 +02:00
use actix deps instead of tokio
This commit is contained in:
@ -43,7 +43,6 @@ futures = "0.3.1"
|
||||
http = { version = "0.1.17", optional = true }
|
||||
log = "0.4"
|
||||
tokio-net = "=0.2.0-alpha.6"
|
||||
tokio-executor = "=0.2.0-alpha.6"
|
||||
trust-dns-resolver = { version="0.18.0-alpha.1", default-features = false }
|
||||
|
||||
# openssl
|
||||
@ -60,4 +59,3 @@ webpki = { version = "0.21", optional = true }
|
||||
bytes = "0.4"
|
||||
actix-testing = { version="0.3.0-alpha.1" }
|
||||
actix-server-config = "0.3.0-alpha.1"
|
||||
tokio = "0.2.0-alpha.6"
|
||||
|
@ -36,7 +36,7 @@ pub use self::service::{ConnectService, ConnectServiceFactory, TcpConnectService
|
||||
|
||||
pub fn start_resolver(cfg: ResolverConfig, opts: ResolverOpts) -> AsyncResolver {
|
||||
let (resolver, bg) = AsyncResolver::new(cfg, opts);
|
||||
tokio_executor::current_thread::spawn(bg);
|
||||
actix_rt::spawn(bg);
|
||||
resolver
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ pub(crate) fn get_default_resolver() -> AsyncResolver {
|
||||
};
|
||||
|
||||
let (resolver, bg) = AsyncResolver::new(cfg, opts);
|
||||
tokio_executor::current_thread::spawn(bg);
|
||||
actix_rt::spawn(bg);
|
||||
|
||||
Arbiter::set_item(DefaultResolver(resolver.clone()));
|
||||
resolver
|
||||
|
@ -48,7 +48,7 @@ async fn test_rustls_string() {
|
||||
assert_eq!(con.peer_addr().unwrap(), srv.addr());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[actix_rt::test]
|
||||
async fn test_static_str() {
|
||||
let srv = TestServer::with(|| {
|
||||
service_fn(|io: Io<tokio_net::tcp::TcpStream>| {
|
||||
|
Reference in New Issue
Block a user