1
0
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:
Nikolay Kim
2019-11-26 08:26:22 +06:00
parent 5efac449b1
commit 52d03fa18c
23 changed files with 44 additions and 57 deletions

View File

@ -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"

View File

@ -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

View File

@ -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>| {