task: fix warning (#4960)

This commit is contained in:
Alice Ryhl 2022-08-31 15:42:30 +02:00 committed by GitHub
parent adc774bc4f
commit 01ebb0aa29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 27 deletions

View File

@ -439,7 +439,7 @@ impl<'a, T: 'static> Builder<'a, T> {
/// [`AbortHandle`]: crate::task::AbortHandle /// [`AbortHandle`]: crate::task::AbortHandle
/// [runtime handle]: crate::runtime::Handle /// [runtime handle]: crate::runtime::Handle
#[track_caller] #[track_caller]
pub fn spawn_on<F>(mut self, future: F, handle: &Handle) -> std::io::Result<AbortHandle> pub fn spawn_on<F>(self, future: F, handle: &Handle) -> std::io::Result<AbortHandle>
where where
F: Future<Output = T>, F: Future<Output = T>,
F: Send + 'static, F: Send + 'static,