summaryrefslogtreecommitdiffstats
path: root/tokio/src/runtime/mod.rs
diff options
context:
space:
mode:
authorTaiki Endo <te316e89@gmail.com>2019-11-16 15:16:21 +0900
committerCarl Lerche <me@carllerche.com>2019-11-15 22:16:21 -0800
commit1474794055e291c544c3c95d6381d549cefbd7d5 (patch)
tree79ebc5721048a0dfc0ac548d49ccf0ee301f39a9 /tokio/src/runtime/mod.rs
parent92eb635669d966840d66067664196d5f8a407f5f (diff)
runtime: allow non-unit type output in {Runtime, Spawner}::spawn (#1756)
Diffstat (limited to 'tokio/src/runtime/mod.rs')
-rw-r--r--tokio/src/runtime/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/tokio/src/runtime/mod.rs b/tokio/src/runtime/mod.rs
index 686a5c26..2d595242 100644
--- a/tokio/src/runtime/mod.rs
+++ b/tokio/src/runtime/mod.rs
@@ -299,7 +299,8 @@ impl Runtime {
#[cfg(feature = "rt-core")]
pub fn spawn<F>(&self, future: F) -> JoinHandle<F::Output>
where
- F: Future<Output = ()> + Send + 'static,
+ F: Future + Send + 'static,
+ F::Output: Send + 'static,
{
match &self.kind {
Kind::Shell(_) => panic!("task execution disabled"),