iZettle / Flow

Flow is a Swift library for working with asynchronous flows and life cycles
MIT License
232 stars 14 forks source link

Use swift result instead of custom result #98

Closed niil-ohlin closed 4 years ago

niil-ohlin commented 4 years ago

What has been done

niil-ohlin commented 4 years ago

I tried running our app with this change and only had to change one line:

-   bag += signal.map(Flow.Result.success).onValue(completion)
+   bag += signal.map { Flow.Result.success($0) }.onValue(completion)

because the type checker could not resolve the type. I think that this warrants a major release.