diff --git a/tokio/src/task/join_set.rs b/tokio/src/task/join_set.rs index beacf682f63..858234cf6a2 100644 --- a/tokio/src/task/join_set.rs +++ b/tokio/src/task/join_set.rs @@ -6,7 +6,6 @@ //! details. use std::fmt; use std::future::Future; -use std::io; use std::pin::Pin; use std::task::{Context, Poll}; @@ -378,7 +377,7 @@ impl<'a, T: 'static> Builder<'a, T> { /// /// [`AbortHandle`]: crate::task::AbortHandle #[track_caller] - pub fn spawn(self, future: F) -> io::Result + pub fn spawn(self, future: F) -> std::io::Result where F: Future, F: Send + 'static, @@ -398,7 +397,7 @@ impl<'a, T: 'static> Builder<'a, T> { /// [`AbortHandle`]: crate::task::AbortHandle /// [runtime handle]: crate::runtime::Handle #[track_caller] - pub fn spawn_on(mut self, future: F, handle: &Handle) -> io::Result + pub fn spawn_on(mut self, future: F, handle: &Handle) -> std::io::Result where F: Future, F: Send + 'static, @@ -421,7 +420,7 @@ impl<'a, T: 'static> Builder<'a, T> { /// [`LocalSet`]: crate::task::LocalSet /// [`AbortHandle`]: crate::task::AbortHandle #[track_caller] - pub fn spawn_local(self, future: F) -> io::Result + pub fn spawn_local(self, future: F) -> std::io::Result where F: Future, F: 'static, @@ -439,7 +438,7 @@ impl<'a, T: 'static> Builder<'a, T> { /// [`LocalSet`]: crate::task::LocalSet /// [`AbortHandle`]: crate::task::AbortHandle #[track_caller] - pub fn spawn_local_on(self, future: F, local_set: &LocalSet) -> io::Result + pub fn spawn_local_on(self, future: F, local_set: &LocalSet) -> std::io::Result where F: Future, F: 'static,