@@ -40,26 +40,25 @@ public enum OPDSParser {
40
40
} . resume ( )
41
41
}
42
42
43
- #if compiler(>=5.5) && canImport(_Concurrency)
43
+ #if compiler(>=5.5) && canImport(_Concurrency)
44
44
45
- /// Asynchronously Parse an OPDS feed or publication.
46
- /// Feed can be v1 (XML) or v2 (JSON).
47
- /// - parameter url: The feed URL
48
- @available ( iOS 13 . 0 , * )
49
- public static func parseURL( url: URL ) async throws -> ParseData {
50
- try await withCheckedThrowingContinuation { continuation in
51
- parseURL ( url: url) { data, error in
52
- if let error = error {
53
- continuation. resume ( with: . failure( error) )
54
- } else if let data = data {
55
- continuation. resume ( with: . success( data) )
56
- } else {
57
- continuation. resume ( with: . failure( OPDSParserError . documentNotValid) )
45
+ /// Asynchronously Parse an OPDS feed or publication.
46
+ /// Feed can be v1 (XML) or v2 (JSON).
47
+ /// - parameter url: The feed URL
48
+ @available ( iOS 13 . 0 , * )
49
+ public static func parseURL( url: URL ) async throws -> ParseData {
50
+ try await withCheckedThrowingContinuation { continuation in
51
+ parseURL ( url: url) { data, error in
52
+ if let error = error {
53
+ continuation. resume ( with: . failure( error) )
54
+ } else if let data = data {
55
+ continuation. resume ( with: . success( data) )
56
+ } else {
57
+ continuation. resume ( with: . failure( OPDSParserError . documentNotValid) )
58
+ }
58
59
}
59
60
}
60
61
}
61
- }
62
-
63
- #endif
64
62
63
+ #endif
65
64
}
0 commit comments