File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public indirect enum Ast: Equatable {
39
39
}
40
40
41
41
/// Comparator used in comparison AST nodes
42
- public enum Comparator : Equatable {
42
+ public enum Comparator : Equatable , JMESSendable {
43
43
case equal
44
44
case notEqual
45
45
case lessThan
@@ -61,3 +61,9 @@ public enum Comparator: Equatable {
61
61
}
62
62
}
63
63
}
64
+
65
+ #if compiler(>=5.6)
66
+ // have to force Sendable conformance as enum `.literal` uses `JMESVariable` which
67
+ // is not necessarily sendable but in the use here it is
68
+ extension Ast : @unchecked Sendable { }
69
+ #endif
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import Foundation
3
3
/// JMES Expression
4
4
///
5
5
/// Holds a compiled JMES expression and allows you to search Json text or a type already in memory
6
- public struct JMESExpression {
6
+ public struct JMESExpression : JMESSendable {
7
7
let ast : Ast
8
8
9
9
public static func compile( _ text: String ) throws -> Self {
Original file line number Diff line number Diff line change
1
+ // Sendable support
2
+
3
+ #if compiler(>=5.6)
4
+ public typealias JMESSendable = Sendable
5
+ #else
6
+ public typealias JMESSendable = Any
7
+ #endif
You can’t perform that action at this time.
0 commit comments