pointfreeco / swift-composable-architecture

A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.
https://www.pointfree.co/collections/composable-architecture
MIT License
11.91k stars 1.37k forks source link

Don't pass embed functions directly to `AnyCasePath.init` #3167

Closed stephencelis closed 1 month ago

stephencelis commented 1 month ago

AnyCasePath closures will be required to be @Sendable for Swift 6 data race checking, but Enum.case functions are not @Sendable implicitly. As such we cannot pass Enum.case directly to functions that expect sendable closures. Instead, we must explicitly write:

{ .case($0) }