Skip to content

Commit d53f695

Browse files
committed
More format
1 parent 3ec6f3e commit d53f695

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

Sources/OPDS/OPDSParser.swift

+16-17
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,25 @@ public enum OPDSParser {
4040
}.resume()
4141
}
4242

43-
#if compiler(>=5.5) && canImport(_Concurrency)
43+
#if compiler(>=5.5) && canImport(_Concurrency)
4444

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+
}
5859
}
5960
}
6061
}
61-
}
62-
63-
#endif
6462

63+
#endif
6564
}

0 commit comments

Comments
 (0)