Fix various code smells as reported by Sonarcloud, fixed tests

This commit is contained in:
Stefan Ceriu
2022-05-25 13:44:24 +03:00
committed by Stefan Ceriu
parent f5890b68a2
commit 73f507045b
6 changed files with 23 additions and 24 deletions
@@ -46,12 +46,12 @@ struct MediaProvider: MediaProviderProtocol {
return .success(image)
}
let cachedImageLoadResult = await withCheckedContinuation({ continuation in
let cachedImageLoadResult = await withCheckedContinuation { continuation in
imageCache.retrieveImage(forKey: source.underlyingSource.url()) { result in
continuation.resume(returning: result)
}
})
}
if case let .success(cacheResult) = cachedImageLoadResult,
let image = cacheResult.image {
return .success(image)