Skip to content

Commit 6a08e86

Browse files
authored
Merge pull request #58 from agrue/sendable
Add `Sendable` conformances for some important types
2 parents 8fcd85d + 9de7118 commit 6a08e86

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

Sources/TSFCASFileTree/CASBlob.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,3 +326,7 @@ public struct LLBCASBlob {
326326
}
327327
}
328328
}
329+
330+
#if swift(>=5.5) && canImport(_Concurrency)
331+
extension LLBCASBlob: Sendable {}
332+
#endif // swift(>=5.5) && canImport(_Concurrency)

Sources/TSFCASFileTree/CASFSClient.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import TSCUtility
1515

1616

1717
/// A main API struct
18-
public struct LLBCASFSClient {
18+
public struct LLBCASFSClient: Sendable {
1919
public let db: LLBCASDatabase
2020

2121
/// Errors produced by CASClient

Sources/TSFCASFileTree/CASFSNode.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public struct LLBCASFSNode {
1717
case notApplicable
1818
}
1919

20-
public enum NodeContent {
20+
public enum NodeContent: Sendable {
2121
case tree(LLBCASFileTree)
2222
case blob(LLBCASBlob)
2323
}
@@ -80,3 +80,7 @@ public struct LLBCASFSNode {
8080
}
8181
}
8282
}
83+
84+
#if swift(>=5.5) && canImport(_Concurrency)
85+
extension LLBCASFSNode: Sendable {}
86+
#endif // swift(>=5.5) && canImport(_Concurrency)

Sources/TSFCASFileTree/FileTree.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,3 +486,6 @@ public final class LLBCASFileTree {
486486
}
487487
}
488488

489+
#if swift(>=5.5) && canImport(_Concurrency)
490+
extension LLBCASFileTree: Sendable {}
491+
#endif // swift(>=5.5) && canImport(_Concurrency)

0 commit comments

Comments
 (0)