Merge pull request #2827 from ryco117/master
Relax Task::perform from Fn to more general FnOnce
This commit is contained in:
commit
7e0d6a13fa
1 changed files with 1 additions and 1 deletions
|
|
@ -37,7 +37,7 @@ impl<T> Task<T> {
|
||||||
/// output with the given closure.
|
/// output with the given closure.
|
||||||
pub fn perform<A>(
|
pub fn perform<A>(
|
||||||
future: impl Future<Output = A> + MaybeSend + 'static,
|
future: impl Future<Output = A> + MaybeSend + 'static,
|
||||||
f: impl Fn(A) -> T + MaybeSend + 'static,
|
f: impl FnOnce(A) -> T + MaybeSend + 'static,
|
||||||
) -> Self
|
) -> Self
|
||||||
where
|
where
|
||||||
T: MaybeSend + 'static,
|
T: MaybeSend + 'static,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue