Skip to content

Commit 520f7fb

Browse files
committed
Add Sendable conformance
1 parent d96a272 commit 520f7fb

File tree

6 files changed

+7
-4
lines changed

6 files changed

+7
-4
lines changed

Sources/XMLCoder/Auxiliaries/Attribute.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ extension Attribute: Codable where Value: Codable {
4040

4141
extension Attribute: Equatable where Value: Equatable {}
4242
extension Attribute: Hashable where Value: Hashable {}
43+
extension Attribute: Sendable where Value: Sendable {}
4344

4445
extension Attribute: ExpressibleByIntegerLiteral where Value: ExpressibleByIntegerLiteral {
4546
public typealias IntegerLiteralType = Value.IntegerLiteralType

Sources/XMLCoder/Auxiliaries/Element.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ extension Element: Codable where Value: Codable {
4040

4141
extension Element: Equatable where Value: Equatable {}
4242
extension Element: Hashable where Value: Hashable {}
43+
extension Element: Sendable where Value: Sendable {}

Sources/XMLCoder/Auxiliaries/ElementAndAttribute.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ extension ElementAndAttribute: Codable where Value: Codable {
4141

4242
extension ElementAndAttribute: Equatable where Value: Equatable {}
4343
extension ElementAndAttribute: Hashable where Value: Hashable {}
44+
extension ElementAndAttribute: Sendable where Value: Sendable {}

Sources/XMLCoder/Auxiliaries/XMLCoderElement.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
import Foundation
1010

11-
struct XMLCoderElement: Equatable {
12-
struct Attribute: Equatable {
11+
struct XMLCoderElement: Equatable, Sendable {
12+
struct Attribute: Equatable, Sendable {
1313
let key: String
1414
let value: String
1515
}

Sources/XMLCoder/Auxiliaries/XMLHeader.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Foundation
1111
/// Type that allows overriding XML header during encoding. Pass a value of this type to the `encode`
1212
/// function of `XMLEncoder` to specify the exact value of the header you'd like to see in the encoded
1313
/// data.
14-
public struct XMLHeader {
14+
public struct XMLHeader: Sendable {
1515
/// The XML standard that the produced document conforms to.
1616
public let version: Double?
1717

Sources/XMLCoder/Auxiliaries/XMLKey.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import Foundation
1010

1111
/// Shared Key Types
12-
struct XMLKey: CodingKey {
12+
struct XMLKey: CodingKey, Sendable {
1313
public let stringValue: String
1414
public let intValue: Int?
1515

0 commit comments

Comments
 (0)