diff --git a/lib/vector-buffers/src/lib.rs b/lib/vector-buffers/src/lib.rs index 7031848daafb7..4b5334674ffa3 100644 --- a/lib/vector-buffers/src/lib.rs +++ b/lib/vector-buffers/src/lib.rs @@ -147,7 +147,10 @@ where T: Send + 'static, { #[cfg(tokio_unstable)] - return tokio::task::Builder::new().name(_name).spawn(task); + return tokio::task::Builder::new() + .name(_name) + .spawn(task) + .expect("tokio task should spawn"); #[cfg(not(tokio_unstable))] tokio::spawn(task) diff --git a/src/lib.rs b/src/lib.rs index a6568cf3523a8..b133205c844b9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -223,7 +223,10 @@ where T: Send + 'static, { #[cfg(tokio_unstable)] - return tokio::task::Builder::new().name(_name).spawn(task); + return tokio::task::Builder::new() + .name(_name) + .spawn(task) + .expect("tokio task should spawn"); #[cfg(not(tokio_unstable))] tokio::spawn(task)