Skip to content

Commit 5344fa4

Browse files
committed
Remove CaseIterable conformance from example enum error types
1 parent 49be80d commit 5344fa4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ This protocol is simple and clear. It’s named `Throwable` to align with Swift
8080
Here’s how you use it:
8181

8282
```swift
83-
enum NetworkError: Throwable, CaseIterable {
83+
enum NetworkError: Throwable {
8484
case noConnectionToServer
8585
case parsingFailed
8686

@@ -100,7 +100,7 @@ When you print `error.localizedDescription`, you'll get exactly the message you
100100
Not all apps are localized, and developers may not have time to provide localized descriptions immediately. To make error handling even simpler, `Throwable` allows you to define your error messages using raw values:
101101

102102
```swift
103-
enum NetworkError: String, Throwable, CaseIterable {
103+
enum NetworkError: String, Throwable {
104104
case noConnectionToServer = "Unable to connect to the server."
105105
case parsingFailed = "Data parsing failed."
106106
}

0 commit comments

Comments
 (0)