From 5a2bc850af7bedb51b70da1486ec8057f8ea5274 Mon Sep 17 00:00:00 2001 From: TennyZhuang Date: Tue, 30 Aug 2022 17:23:53 +0800 Subject: [PATCH] task: fix incorrect signature in `Builder::spawn_on` (#4953) --- tokio/src/task/builder.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tokio/src/task/builder.rs b/tokio/src/task/builder.rs index 5635c1a430a..c7a101b294c 100644 --- a/tokio/src/task/builder.rs +++ b/tokio/src/task/builder.rs @@ -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( - &mut self, - future: Fut, - handle: &Handle, - ) -> io::Result> + pub fn spawn_on(self, future: Fut, handle: &Handle) -> io::Result> where Fut: Future + Send + 'static, Fut::Output: Send + 'static,