From 0ab451c1abd911d611d56c627f92c5215d6643cf Mon Sep 17 00:00:00 2001 From: Vladimirs Nordholm Date: Thu, 16 May 2024 09:02:04 +0200 Subject: [PATCH] fix: non-sendable --- Sources/CachedAsyncImage/CachedAsyncImage.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Sources/CachedAsyncImage/CachedAsyncImage.swift b/Sources/CachedAsyncImage/CachedAsyncImage.swift index 4ba71d7..acbe320 100644 --- a/Sources/CachedAsyncImage/CachedAsyncImage.swift +++ b/Sources/CachedAsyncImage/CachedAsyncImage.swift @@ -79,7 +79,7 @@ public struct CachedAsyncImage: 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. @@ -312,7 +312,6 @@ public struct CachedAsyncImage: View where Content: View { } } - @Sendable private func load() async { do { if let urlRequest = urlRequest {