From 6daa9f8f941b13eeb6bd9424f7a29b0d540b55a3 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Sat, 3 Dec 2022 13:50:13 -0800 Subject: [PATCH] Enable tokio1 compatibility Fixes the following issue: thread 'main' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime', /build/cargo-vendor-dir/hyper-0.14.23/src/client/connect/dns.rs:121:24 --- Cargo.lock | 2 ++ ofborg/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 386bb16..91d40b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -106,6 +106,7 @@ dependencies = [ "blocking", "futures-lite", "once_cell", + "tokio", ] [[package]] @@ -1998,6 +1999,7 @@ dependencies = [ "libc", "memchr", "mio", + "num_cpus", "pin-project-lite", "socket2", "winapi", diff --git a/ofborg/Cargo.toml b/ofborg/Cargo.toml index 5c3c123..49fb829 100644 --- a/ofborg/Cargo.toml +++ b/ofborg/Cargo.toml @@ -6,7 +6,7 @@ build = "build.rs" edition = "2018" [dependencies] -async-std = { version = "=1.12.0", features = ["unstable"] } +async-std = { version = "=1.12.0", features = ["unstable", "tokio1"] } chrono = "0.4.22" either = "1.8.0" fs2 = "0.4.3"