1.4.0
What's Changed
-
Added: A
@CasePathable
instance can now be used to look up its associated case path (#158).@CasePathable enum Foo { case bar(Int) case baz(String) } let baz = Foo.baz("Blob") let bazCase = Foo.allCasePaths[baz] // PartialCaseKeyPath<Foo> baz.is(bazCase) // true
-
Added: A
@CasePathable
enum can now iterate over all of its case key paths (#159).@CasePathable enum Foo { case bar(Int) case baz(String) } let baz = Foo.baz("Blob") for casePath in Foo.allCasePaths { print(baz.is(casePath)) } // false // true let casePaths = Array(Foo.allCasePaths) // [PartialCaseKeyPath<Foo>] casePaths == [\.bar, \.baz] // true
-
Infrastructure: Strict concurrency has been enabled in preparation for Swift 6 (#156).
Full Changelog: 1.3.3...1.4.0