Merge pull request #1409 from wuxianucw/master
Relax `Fn` trait bounds in `Command` & `Action`
This commit is contained in:
commit
f728d6c059
1 changed files with 1 additions and 1 deletions
|
|
@ -36,7 +36,7 @@ impl<T> Command<T> {
|
||||||
/// Creates a [`Command`] that performs the action of the given future.
|
/// Creates a [`Command`] that performs the action of the given future.
|
||||||
pub fn perform<A>(
|
pub fn perform<A>(
|
||||||
future: impl Future<Output = T> + 'static + MaybeSend,
|
future: impl Future<Output = T> + 'static + MaybeSend,
|
||||||
f: impl Fn(T) -> A + 'static + MaybeSend,
|
f: impl FnOnce(T) -> A + 'static + MaybeSend,
|
||||||
) -> Command<A> {
|
) -> Command<A> {
|
||||||
use iced_futures::futures::FutureExt;
|
use iced_futures::futures::FutureExt;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue