Skip to content

Commit 1d5bb9e

Browse files
Apply SwiftFormat cleanup for Swift 6 stack
1 parent 205427e commit 1d5bb9e

11 files changed

Lines changed: 81 additions & 81 deletions

File tree

platforms/swift/.swiftformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
--allman false
77
--semicolons inline
88
--trimwhitespace always
9-
--disable redundantReturn,hoistAwait,preferKeyPath,redundantInternal,redundantPublic
9+
--disable redundantReturn,hoistAwait,preferKeyPath,redundantInternal,redundantPublic,duplicateImports
1010
--swiftversion 5.7.1
1111
--extensionacl on-declarations
1212
--exclude Sources/ShopifyCheckoutKit/Models.swift

platforms/swift/Sources/ShopifyAcceleratedCheckouts/Internal/GraphQLClient/GraphQLRequest/GraphQLRequest+Directives.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import Foundation
2626
/// The country and language context for the API requests
2727
/// see: https://shopify.dev/changelog/storefront-api-incontext-directive-supports-languages
2828
@available(iOS 16.0, *)
29-
struct InContextDirective: Sendable {
29+
struct InContextDirective {
3030
let countryCode: CountryCode
3131
let languageCode: ShopifyLanguageCode
3232

platforms/swift/Sources/ShopifyAcceleratedCheckouts/Internal/GraphQLClient/GraphQLResponse.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323

2424
/// GraphQL response structure
25-
struct GraphQLResponse<T: Decodable & Sendable>: Decodable, Sendable {
25+
struct GraphQLResponse<T: Decodable & Sendable>: Decodable {
2626
let data: T?
2727
let errors: [GraphQLResponseError]?
2828
let extensions: [String: AnyCodable]?
@@ -34,18 +34,18 @@ struct GraphQLResponse<T: Decodable & Sendable>: Decodable, Sendable {
3434
}
3535

3636
/// GraphQL error from response
37-
struct GraphQLResponseError: Decodable, Error, Sendable {
37+
struct GraphQLResponseError: Decodable, Error {
3838
let message: String
3939
let path: [String]?
4040
let locations: [Location]?
4141
let extensions: Extensions?
4242

43-
struct Location: Decodable, Sendable {
43+
struct Location: Decodable {
4444
let line: Int
4545
let column: Int
4646
}
4747

48-
struct Extensions: Decodable, Sendable {
48+
struct Extensions: Decodable {
4949
let code: String?
5050
let field: [String]?
5151
let cost: Int?

platforms/swift/Sources/ShopifyAcceleratedCheckouts/Internal/GraphQLClient/GraphQLScalars.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import Foundation
2626
/// Custom scalar types for the Storefront API
2727
enum GraphQLScalars {
2828
/// Represents a globally unique identifier (GID) in the Storefront API
29-
struct ID: Codable, Sendable, Hashable, CustomStringConvertible {
29+
struct ID: Codable, Hashable, CustomStringConvertible {
3030
let rawValue: String
3131

3232
init(_ rawValue: String) {
@@ -54,13 +54,13 @@ enum GraphQLScalars {
5454
}
5555

5656
/// Represents a monetary value with a decimal amount and currency code
57-
struct Money: Codable, Sendable, Hashable {
57+
struct Money: Codable, Hashable {
5858
let amount: Decimal
5959
let currencyCode: String
6060
}
6161

6262
/// Represents an ISO 8601 encoded date-time string
63-
struct DateTime: Codable, Sendable, Hashable {
63+
struct DateTime: Codable, Hashable {
6464
let date: Date
6565

6666
init(_ date: Date) {
@@ -99,7 +99,7 @@ enum GraphQLScalars {
9999
}
100100

101101
/// Represents an absolute URL
102-
struct URL: Codable, Sendable, Hashable {
102+
struct URL: Codable, Hashable {
103103
let url: Foundation.URL
104104

105105
init(_ url: Foundation.URL) {
@@ -130,7 +130,7 @@ enum GraphQLScalars {
130130
}
131131

132132
/// Represents HTML content
133-
struct HTML: Codable, Sendable, Hashable {
133+
struct HTML: Codable, Hashable {
134134
let rawValue: String
135135

136136
init(_ rawValue: String) {
@@ -150,7 +150,7 @@ enum GraphQLScalars {
150150
}
151151

152152
/// ISO 4217 currency codes
153-
enum CurrencyCode: String, Codable, Sendable, CaseIterable {
153+
enum CurrencyCode: String, Codable, CaseIterable {
154154
case aed = "AED"
155155
case afn = "AFN"
156156
case all = "ALL"
@@ -309,7 +309,7 @@ enum CurrencyCode: String, Codable, Sendable, CaseIterable {
309309
case zmw = "ZMW"
310310
}
311311

312-
enum LanguageCode: String, CaseIterable, Codable, Sendable {
312+
enum LanguageCode: String, CaseIterable, Codable {
313313
/// Afrikaans
314314
case AF
315315
/// Akan
@@ -604,7 +604,7 @@ enum LanguageCode: String, CaseIterable, Codable, Sendable {
604604
/// If a territory doesn't have a country code value in the `CountryCode` enum, then it might be considered a subdivision
605605
/// of another country. For example, the territories associated with Spain are represented by the country code `ES`,
606606
/// and the territories associated with the United States of America are represented by the country code `US`.
607-
enum CountryCode: String, CaseIterable, Codable, Sendable {
607+
enum CountryCode: String, CaseIterable, Codable {
608608
/// Afghanistan
609609
case AF
610610
/// Åland Islands

platforms/swift/Sources/ShopifyAcceleratedCheckouts/Internal/GraphQLClient/GraphQLTypes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import Foundation
2525

2626
/// GraphQL client errors
27-
enum GraphQLError: LocalizedError, Sendable {
27+
enum GraphQLError: LocalizedError {
2828
case networkError(String)
2929
case httpError(statusCode: Int, data: Data)
3030
case decodingError(Error)

platforms/swift/Sources/ShopifyAcceleratedCheckouts/Internal/StorefrontAPI/StorefrontAPI+Mutations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ extension StorefrontAPI {
7575
return cart
7676
}
7777

78-
struct CartBuyerIdentityUpdateInput: Codable, Sendable {
78+
struct CartBuyerIdentityUpdateInput: Codable {
7979
var email: String?
8080
var phoneNumber: String?
8181
var customerAccessToken: String?

0 commit comments

Comments
 (0)