fix: silence unused withLock result warning in OutlineImageProvider
lock.withLock { inFlight.remove(url) } inside the defer returned
Set.remove's String? result unused - withLock mirrors its closure's
return type, so an unused Set.remove leaked through as an unused
withLock result. Explicitly discard it inside the closure instead.
This commit is contained in:
@@ -61,7 +61,7 @@ final class OutlineImageProvider: EmbeddedImageProvider, @unchecked Sendable {
|
|||||||
guard !alreadyLoading else { return }
|
guard !alreadyLoading else { return }
|
||||||
|
|
||||||
Task {
|
Task {
|
||||||
defer { lock.withLock { inFlight.remove(url) } }
|
defer { lock.withLock { _ = inFlight.remove(url) } }
|
||||||
do {
|
do {
|
||||||
let data: Data
|
let data: Data
|
||||||
if url.hasPrefix("http://") || url.hasPrefix("https://"), let externalURL = URL(string: url) {
|
if url.hasPrefix("http://") || url.hasPrefix("https://"), let externalURL = URL(string: url) {
|
||||||
|
|||||||
Reference in New Issue
Block a user