Skip to content

Commit

Permalink
Fix warning in CachedAsyncImage
Browse files Browse the repository at this point in the history
  • Loading branch information
gemcoder21 committed Jun 8, 2024
1 parent 744f4ab commit 9aa249f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Packages/Components/Sources/CachedAsyncImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public struct CachedAsyncImage<Content>: View where Content: View {

public var body: some View {
content(phase)
.task(id: urlRequest, load)
.task(id: urlRequest) { await load() }
}

/// Loads and displays an image from the specified URL.
Expand Down Expand Up @@ -311,8 +311,7 @@ public struct CachedAsyncImage<Content>: View where Content: View {
self._phase = State(wrappedValue: .failure(error))
}
}

@Sendable

private func load() async {
do {
if let urlRequest = urlRequest {
Expand Down

0 comments on commit 9aa249f

Please sign in to comment.