Skip to content

Commit 258b3dd

Browse files
qmoyap4checo
authored andcommitted
Fix example (#1473)
The example implementation of `NumberFactClient.liveValue` wasn’t compiling. This PR fixes that. (cherry picked from commit 7d9264d03758c79241ff8ea18311c7dc1be74874)
1 parent 9bdf1c4 commit 258b3dd

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
@@ -418,10 +418,10 @@ application in simulators or devices:
418418
```swift
419419
extension NumberFactClient: DependencyKey {
420420
static let liveValue = Self(
421-
fetch: {
421+
fetch: { number in
422422
let (data, _) = try await URLSession.shared
423423
.data(from: .init(string: "http://numbersapi.com/\(number)")!)
424-
return String(decoding: data, using: UTF8.self)
424+
return String(decoding: data, as: UTF8.self)
425425
}
426426
)
427427
}

0 commit comments

Comments
 (0)