diff options
author | 2023-10-19 00:59:01 +0200 | |
---|---|---|
committer | 2023-10-19 00:59:01 +0200 | |
commit | 0770e7eaf842021a4b15b00e1b81ba10dd9b8140 (patch) | |
tree | 0150bba30008bafcadc8a8baca605aaaa74f9b83 /runtime/src/command.rs | |
parent | bc9bb28b1ccd1248d63ccdfef2f57d7aa837abbb (diff) | |
parent | 54e6d2b5fa1fe29e2e3588b51f6cfff36563cefc (diff) | |
download | iced-0770e7eaf842021a4b15b00e1b81ba10dd9b8140.tar.gz iced-0770e7eaf842021a4b15b00e1b81ba10dd9b8140.tar.bz2 iced-0770e7eaf842021a4b15b00e1b81ba10dd9b8140.zip |
Merge pull request #2000 from ids1024/perform
Fix `Command<T>::perform` to return a `Command<T>`
Diffstat (limited to 'runtime/src/command.rs')
-rw-r--r-- | runtime/src/command.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/src/command.rs b/runtime/src/command.rs index cd4c51ff..b74097bd 100644 --- a/runtime/src/command.rs +++ b/runtime/src/command.rs @@ -40,9 +40,9 @@ 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 FnOnce(T) -> A + 'static + MaybeSend, - ) -> Command<A> { + future: impl Future<Output = A> + 'static + MaybeSend, + f: impl FnOnce(A) -> T + 'static + MaybeSend, + ) -> Command<T> { use iced_futures::futures::FutureExt; Command::single(Action::Future(Box::pin(future.map(f)))) |