summaryrefslogtreecommitdiff
path: root/cli/tokio_util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tokio_util.rs')
-rw-r--r--cli/tokio_util.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/tokio_util.rs b/cli/tokio_util.rs
index ec1e0e3cf..0b8f60152 100644
--- a/cli/tokio_util.rs
+++ b/cli/tokio_util.rs
@@ -5,7 +5,7 @@ use tokio::runtime;
pub fn run<F>(future: F)
where
- F: Future<Output = Result<(), ()>> + Send + 'static,
+ F: Future<Output = ()> + Send + 'static,
{
let mut rt = runtime::Builder::new()
.threaded_scheduler()
@@ -13,12 +13,12 @@ where
.thread_name("deno")
.build()
.expect("Unable to create Tokio runtime");
- rt.block_on(future).unwrap();
+ rt.block_on(future);
}
pub fn run_on_current_thread<F>(future: F)
where
- F: Future<Output = Result<(), ()>> + Send + 'static,
+ F: Future<Output = ()> + Send + 'static,
{
let mut rt = runtime::Builder::new()
.basic_scheduler()
@@ -26,5 +26,5 @@ where
.thread_name("deno")
.build()
.expect("Unable to create Tokio runtime");
- rt.block_on(future).unwrap();
+ rt.block_on(future);
}