Merge pull request #1409 from wuxianucw/master

Relax `Fn` trait bounds in `Command` & `Action`
This commit is contained in:
Héctor Ramón 2022-08-17 16:09:56 +02:00 committed by GitHub
commit f728d6c059
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ impl<T> Command<T> {
/// Creates a [`Command`] that performs the action of the given future.
pub fn perform<A>(
future: impl Future<Output = T> + 'static + MaybeSend,
f: impl Fn(T) -> A + 'static + MaybeSend,
f: impl FnOnce(T) -> A + 'static + MaybeSend,
) -> Command<A> {
use iced_futures::futures::FutureExt;