summaryrefslogtreecommitdiffstats
path: root/tokio-test
diff options
context:
space:
mode:
Diffstat (limited to 'tokio-test')
-rw-r--r--tokio-test/src/lib.rs14
1 files changed, 4 insertions, 10 deletions
diff --git a/tokio-test/src/lib.rs b/tokio-test/src/lib.rs
index 58499bbb..749112d8 100644
--- a/tokio-test/src/lib.rs
+++ b/tokio-test/src/lib.rs
@@ -26,15 +26,9 @@ pub mod task;
///
/// [runtime-block-on]: https://docs.rs/tokio/0.2.0-alpha.2/tokio/runtime/current_thread/struct.Runtime.html#method.block_on
pub fn block_on<F: std::future::Future>(future: F) -> F::Output {
- let mut rt = tokio::runtime::current_thread::Runtime::new().unwrap();
- rt.block_on(future)
-}
+ use tokio::runtime;
-/*
-#[doc(hidden)]
-pub mod codegen {
- pub mod futures {
- pub use futures::*;
- }
+ let mut rt = runtime::Builder::new().current_thread().build().unwrap();
+
+ rt.block_on(future)
}
-*/