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
() -> Voidinstead of(Result) -> Void. Completion is designed to be used in addition tosuccessandfailureto do things like hiding activity indicators. That's why theResultvariant never really made sense. If you'd like to useResultinstead, 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 addsuccessclosure. Previously, it used to attachcompletionclosure. 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.