diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-01-30 11:28:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-30 11:28:51 -0500 |
commit | 25b13c8917061c569e8f92da124b1b446dc223f0 (patch) | |
tree | 632d47e4c8b5ed5efea498f2ee0293a055ab806b /cli/tokio_util.rs | |
parent | 2338e7679c8840314642dbf3ea838908f5f35d3c (diff) |
Use tokio::main (#3831)
Diffstat (limited to 'cli/tokio_util.rs')
-rw-r--r-- | cli/tokio_util.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cli/tokio_util.rs b/cli/tokio_util.rs index df14d11e4..3bf82f314 100644 --- a/cli/tokio_util.rs +++ b/cli/tokio_util.rs @@ -1,13 +1,11 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -use std::future::Future; -use tokio; -use tokio::runtime; +#[cfg(test)] pub fn run<F>(future: F) where - F: Future<Output = ()> + Send + 'static, + F: std::future::Future<Output = ()> + Send + 'static, { - let mut rt = runtime::Builder::new() + let mut rt = tokio::runtime::Builder::new() .threaded_scheduler() .enable_all() .thread_name("deno") |