@@ -17,9 +17,7 @@ public extension RegistryClient {
1717 repository: ImageReference . Repository ,
1818 reference: any ImageReference . Reference ,
1919 manifest: ImageManifest
20- ) async throws
21- -> String
22- {
20+ ) async throws -> String {
2321 // See https://github.com/opencontainers/distribution-spec/blob/main/spec.md#pushing-manifests
2422 let httpResponse = try await executeRequestThrowing (
2523 // All blob uploads have Content-Type: application/octet-stream on the wire, even if mediatype is different
@@ -44,11 +42,12 @@ public extension RegistryClient {
4442 . absoluteString
4543 }
4644
47- func getManifest( repository: ImageReference . Repository , reference: any ImageReference . Reference ) async throws
48- -> ImageManifest
49- {
45+ func getManifest(
46+ repository: ImageReference . Repository ,
47+ reference: any ImageReference . Reference
48+ ) async throws -> ImageManifest {
5049 // See https://github.com/opencontainers/distribution-spec/blob/main/spec.md#pulling-manifests
51- try await executeRequestThrowing (
50+ let ( data , _ ) = try await executeRequestThrowing (
5251 . get(
5352 repository,
5453 path: " manifests/ \( reference) " ,
@@ -59,14 +58,15 @@ public extension RegistryClient {
5958 ) ,
6059 decodingErrors: [ . notFound]
6160 )
62- . data
61+ return try decoder . decode ( ImageManifest . self , from : data)
6362 }
6463
65- func getIndex( repository: ImageReference . Repository , reference: any ImageReference . Reference ) async throws
66- -> ImageIndex
67- {
64+ func getIndex(
65+ repository: ImageReference . Repository ,
66+ reference: any ImageReference . Reference
67+ ) async throws -> ImageIndex {
6868 // See https://github.com/opencontainers/distribution-spec/blob/main/spec.md#pulling-manifests
69- try await executeRequestThrowing (
69+ let ( data , _ ) = try await executeRequestThrowing (
7070 . get(
7171 repository,
7272 path: " manifests/ \( reference) " ,
@@ -77,6 +77,6 @@ public extension RegistryClient {
7777 ) ,
7878 decodingErrors: [ . notFound]
7979 )
80- . data
80+ return try decoder . decode ( ImageIndex . self , from : data)
8181 }
8282}
0 commit comments