mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-09-15 08:50:57 +00:00
Remove dead protocol.
This commit is contained in:
parent
e5578260e9
commit
692059b833
@ -1,27 +0,0 @@
|
|||||||
import Foundation
|
|
||||||
|
|
||||||
@objc public protocol ReleasesDownloaderProtocol {
|
|
||||||
|
|
||||||
func downloadReleases(with reply: @escaping (Data?, (any Error)?) -> Void)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
extension ReleasesDownloaderProtocol {
|
|
||||||
|
|
||||||
func downloadReleases() async throws -> Data {
|
|
||||||
try await withCheckedThrowingContinuation { continuation in
|
|
||||||
downloadReleases { data, error in
|
|
||||||
if let error {
|
|
||||||
continuation.resume(throwing: error)
|
|
||||||
} else if let data {
|
|
||||||
continuation.resume(returning: data)
|
|
||||||
} else {
|
|
||||||
continuation.resume(throwing: NoDataError())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
struct NoDataError: Error {}
|
|
Loading…
Reference in New Issue
Block a user