From b7c6a14571918d64837b0e98d6bae3eb052906e6 Mon Sep 17 00:00:00 2001 From: Adrian Heine Date: Mon, 19 Oct 2020 14:29:10 +0200 Subject: [PATCH] Update dependencies --- Cargo.toml | 4 ++-- src/async_utils.rs | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4c82032..7c9a897 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,11 +6,11 @@ edition = "2018" build = "src/build.rs" [dependencies] -users = "0.10.0" +users = "0.11.0" regex = "1.0.1" futures = "0.3" async-trait = "0.1" -tokio = { version = "0.2", features = ["process", "io-util", "rt-core", "macros", "sync"] } +tokio = { version = "0.3", features = ["rt", "process", "io-util", "macros", "sync"] } once_cell = "1.4" [dev-dependencies] diff --git a/src/async_utils.rs b/src/async_utils.rs index 2c1196a..c656c53 100644 --- a/src/async_utils.rs +++ b/src/async_utils.rs @@ -6,11 +6,15 @@ use std::{ thread, time::Duration, }; +use tokio::runtime::Builder; pub use async_trait::async_trait; pub fn run(future: F) -> F::Output { - tokio::runtime::Runtime::new().unwrap().block_on(future) + Builder::new_current_thread() + .build() + .unwrap() + .block_on(future) } pub use tokio::try_join;