This repository was archived by the owner on Feb 5, 2023. It is now read-only.
FutureX 0.17
Refined on
method to attach callbacks. There are just two minor changes:
- Completion closure signature is now
() -> Void
instead of(Result) -> Void
. Completion is designed to be used in addition tosuccess
andfailure
to do things like hiding activity indicators. That's why theResult
variant never really made sense. If you'd like to useResult
instead, usefuture.materialize().on { result in }
. - Add a
func on(success: (Value) -> Void)
method. Nowfuture.on { }
(with a trailing closure) is inferred by the compiler to addsuccess
closure. Previously, it used to attachcompletion
closure. This change makes it a little bit nices to attach callbacks to futures that can't produce errors (Future<_, Never>
).
There is also a change in the project structure. We now use a single multi-platform target instead of four separate targets - one for each platform.