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 {
3939}
4040
4141/// Comparator used in comparison AST nodes
42- public enum Comparator : Equatable {
42+ public enum Comparator : Equatable , JMESSendable {
4343 case equal
4444 case notEqual
4545 case lessThan
@@ -61,3 +61,9 @@ public enum Comparator: Equatable {
6161 }
6262 }
6363}
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
33/// JMES Expression
44///
55/// 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 {
77 let ast : Ast
88
99 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