Skip to content

Commit

Permalink
Extractor use swift async instead asyncCompactMap
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mattiello <[email protected]>
  • Loading branch information
JoeMatt committed Feb 13, 2025
1 parent 42f6ef8 commit 1eefb28
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions PVLibrary/Sources/Extractor/Extractor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ public final actor Extractor {
}

private func decompress(entries: [ZipEntry]) async throws -> [DecompressedEntry] {
await Task {
let result = await entries.asyncCompactMap { entry -> DecompressedEntry? in
let r = await Task {
let result = await entries.async.compactMap { entry -> DecompressedEntry? in
guard let data = entry.data else {
ELOG("Nil data")
return nil
Expand All @@ -128,5 +128,6 @@ public final actor Extractor {
}
return result
}.value
return await Array(r)
}
}

0 comments on commit 1eefb28

Please sign in to comment.