Relax perform from Fn to more general FnOnce
This commit is contained in:
parent
beddf49c76
commit
b9ebf45a03
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