diff options
| author | Fuwn <[email protected]> | 2026-03-24 06:37:11 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-03-24 06:37:11 +0000 |
| commit | d6e2309de041c69bf36ea4027bebabace891634d (patch) | |
| tree | dd2fe7b0e3a89c2be146c2e08a3c426aecadcee6 /Sora/Data/Booru | |
| parent | test: update source analysis assertions (diff) | |
| download | sora-testing-d6e2309de041c69bf36ea4027bebabace891634d.tar.xz sora-testing-d6e2309de041c69bf36ea4027bebabace891634d.zip | |
style(Sora): Run formatter
Diffstat (limited to 'Sora/Data/Booru')
| -rw-r--r-- | Sora/Data/Booru/BooruNetworkImageLoader.swift | 14 | ||||
| -rw-r--r-- | Sora/Data/Booru/Tag/DanbooruTagParser.swift | 3 | ||||
| -rw-r--r-- | Sora/Data/Booru/Tag/GelbooruAutocompleteTagParser.swift | 3 |
3 files changed, 12 insertions, 8 deletions
diff --git a/Sora/Data/Booru/BooruNetworkImageLoader.swift b/Sora/Data/Booru/BooruNetworkImageLoader.swift index c2a0f8a..8005550 100644 --- a/Sora/Data/Booru/BooruNetworkImageLoader.swift +++ b/Sora/Data/Booru/BooruNetworkImageLoader.swift @@ -29,12 +29,14 @@ actor BooruNetworkImageLoader: NetworkImageLoader { let customUserAgent = self.customUserAgent let task = Task<CGImage, Error> { - guard let data = await ImageCacheManager.shared.loadImageData( - for: url, - domain: domain, - sendUserAgent: sendUserAgent, - customUserAgent: customUserAgent - ) else { + guard + let data = await ImageCacheManager.shared.loadImageData( + for: url, + domain: domain, + sendUserAgent: sendUserAgent, + customUserAgent: customUserAgent + ) + else { throw URLError(.badServerResponse) } diff --git a/Sora/Data/Booru/Tag/DanbooruTagParser.swift b/Sora/Data/Booru/Tag/DanbooruTagParser.swift index 3da165a..9c48e11 100644 --- a/Sora/Data/Booru/Tag/DanbooruTagParser.swift +++ b/Sora/Data/Booru/Tag/DanbooruTagParser.swift @@ -9,7 +9,8 @@ nonisolated class DanbooruTagParser { func parse() -> [BooruTag] { do { - guard let decodedTags = try JSONSerialization.jsonObject(with: data) as? [[String: Any]] else { + guard let decodedTags = try JSONSerialization.jsonObject(with: data) as? [[String: Any]] + else { debugPrint("DanbooruTagParser.parse: failed to decode top-level tag array.") return [] diff --git a/Sora/Data/Booru/Tag/GelbooruAutocompleteTagParser.swift b/Sora/Data/Booru/Tag/GelbooruAutocompleteTagParser.swift index c69cd9b..fb57437 100644 --- a/Sora/Data/Booru/Tag/GelbooruAutocompleteTagParser.swift +++ b/Sora/Data/Booru/Tag/GelbooruAutocompleteTagParser.swift @@ -9,7 +9,8 @@ nonisolated class GelbooruAutocompleteTagParser { func parse() -> [BooruTag] { do { - guard let decodedTags = try JSONSerialization.jsonObject(with: data) as? [[String: Any]] else { + guard let decodedTags = try JSONSerialization.jsonObject(with: data) as? [[String: Any]] + else { debugPrint("GelbooruAutocompleteTagParser.parse: failed to decode top-level tag array.") return [] |