Skip to content

Commit 96850ff

Browse files
committed
An even better and clearer way to write the executing concatenation
1 parent ee0ebfc commit 96850ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/Action/Action.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ public final class Action<Input, Element> {
9898
.merge()
9999

100100
executing = executionObservables.flatMap {
101-
Observable
102-
.just(true)
103-
.concat($0.ignoreElements().map { _ in true }.catchError { _ in Observable.empty() })
104-
.concat(Observable.just(false))
101+
Observable.concat([
102+
Observable.just(true),
103+
$0.ignoreElements().map { _ in true }.catchError { _ in Observable.empty() },
104+
Observable.just(false)])
105105
}
106106
.startWith(false)
107107
.shareReplay(1)

0 commit comments

Comments
 (0)