Skip to content

Commit fb67def

Browse files
committed
Add trivial Sendable conformances
1 parent 77f15ba commit fb67def

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

products/llbuildSwift/BuildSystemBindings.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ private final class CommandWrapper {
519519
}
520520

521521
/// Encapsulates a diagnostic as reported by the build system.
522-
public struct Diagnostic {
522+
public struct Diagnostic: Sendable {
523523
public typealias Kind = DiagnosticKind
524524

525525
/// The kind of diagnostic.
@@ -726,7 +726,7 @@ public struct ProcessHandle: Hashable {
726726
}
727727
}
728728

729-
public struct CommandMetrics {
729+
public struct CommandMetrics: Hashable, Sendable {
730730
public let utime: UInt64 /// User time (in us)
731731
public let stime: UInt64 /// Sys time (in us)
732732
public let maxRSS: UInt64 /// Max RSS (in bytes)
@@ -739,7 +739,7 @@ public struct CommandMetrics {
739739
}
740740

741741
/// Result of a command execution.
742-
public struct CommandExtendedResult {
742+
public struct CommandExtendedResult: Sendable {
743743
public let result: CommandResult /// The result of a command execution
744744
public let exitStatus: Int32 /// The exit code
745745
public let pid: llbuild_pid_t? /// The process identifier (nil if failed to create a process)

products/llbuildSwift/CoreBindings.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private func stringFromUInt8Array(_ data: [UInt8]) -> String {
3131
}
3232

3333
/// Key objects are used to identify rules that can be built.
34-
public struct Key: CustomStringConvertible, Equatable, Hashable {
34+
public struct Key: CustomStringConvertible, Equatable, Hashable, Sendable {
3535
public let data: [UInt8]
3636

3737
// MARK: CustomStringConvertible Conformance
@@ -66,7 +66,7 @@ public struct Key: CustomStringConvertible, Equatable, Hashable {
6666
}
6767

6868
/// Value objects are the result of building rules.
69-
public struct Value: CustomStringConvertible, Equatable, Hashable {
69+
public struct Value: CustomStringConvertible, Equatable, Hashable, Sendable {
7070
public let data: [UInt8]
7171

7272
public var description: String {

products/llbuildSwift/NinjaManifest.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public enum NinjaError: Error {
1818
case invalidManifest(errors: String)
1919
}
2020

21-
public struct NinjaRule: Codable, Equatable {
21+
public struct NinjaRule: Codable, Equatable, Sendable {
2222
public let name: String
2323
public let variables: [String: String]
2424

@@ -28,7 +28,7 @@ public struct NinjaRule: Codable, Equatable {
2828
}
2929
}
3030

31-
public struct NinjaBuildStatement: Codable, Equatable {
31+
public struct NinjaBuildStatement: Codable, Equatable, Sendable {
3232
public let rule: NinjaRule
3333
public let command: String
3434
public let description: String
@@ -61,7 +61,7 @@ public struct NinjaBuildStatement: Codable, Equatable {
6161
}
6262
}
6363

64-
public struct NinjaManifest: Codable, Equatable {
64+
public struct NinjaManifest: Codable, Equatable, Sendable {
6565
public let rules: [String: NinjaRule]
6666
public let statements: [NinjaBuildStatement]
6767
public let defaultTargets: [String]

0 commit comments

Comments
 (0)