Skip to content

Commit 54b6247

Browse files
authored
Additional clean up suspend(while:) (#730)
1 parent 63e5c43 commit 54b6247

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sources/ComposableArchitecture/Beta/Concurrency.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,7 @@ import SwiftUI
220220
public func suspend(while predicate: @escaping (State) -> Bool) async {
221221
_ = await self.publisher
222222
.values
223-
.filter { !predicate($0) }
224-
.first(where: { _ in true })
223+
.first(where: { !predicate($0) })
225224
}
226225
}
227226
#endif

0 commit comments

Comments
 (0)