task: fix incorrect signature in Builder::spawn_on (#4953)

This commit is contained in:
TennyZhuang
2022-08-30 09:23:53 +00:00
committed by GitHub
parent ba93b28033
commit 5a2bc850af
+1 -5
View File
@@ -99,11 +99,7 @@ impl<'a> Builder<'a> {
/// [runtime handle]: crate::runtime::Handle
/// [`Handle::spawn`]: crate::runtime::Handle::spawn
#[track_caller]
pub fn spawn_on<Fut>(
&mut self,
future: Fut,
handle: &Handle,
) -> io::Result<JoinHandle<Fut::Output>>
pub fn spawn_on<Fut>(self, future: Fut, handle: &Handle) -> io::Result<JoinHandle<Fut::Output>>
where
Fut: Future + Send + 'static,
Fut::Output: Send + 'static,