feat: Conforming types to Sendable
This commit is contained in:
@@ -4,8 +4,8 @@ import Foundation
|
||||
/// on the current value.
|
||||
///
|
||||
@dynamicMemberLookup
|
||||
public struct Flagged: Equatable {
|
||||
|
||||
public struct Flagged: Equatable, Sendable {
|
||||
|
||||
public var checkValue: CheckHandler
|
||||
public var wrappedValue: Double
|
||||
|
||||
@@ -51,11 +51,11 @@ public struct Flagged: Equatable {
|
||||
}
|
||||
}
|
||||
|
||||
public struct CheckHandler {
|
||||
|
||||
let checkValue: (Double) -> CheckResult
|
||||
|
||||
public init(_ checkValue: @escaping (Double) -> CheckResult) {
|
||||
public struct CheckHandler: Sendable {
|
||||
|
||||
let checkValue: @Sendable (Double) -> CheckResult
|
||||
|
||||
public init(_ checkValue: @escaping @Sendable (Double) -> CheckResult) {
|
||||
self.checkValue = checkValue
|
||||
}
|
||||
|
||||
@@ -64,8 +64,8 @@ public struct Flagged: Equatable {
|
||||
}
|
||||
}
|
||||
|
||||
public enum CheckResult: Equatable {
|
||||
|
||||
public enum CheckResult: Equatable, Sendable {
|
||||
|
||||
case aboveMaximum(Double)
|
||||
case belowMinimum(Double)
|
||||
case betweenRange(minimum: Double, maximum: Double)
|
||||
@@ -113,7 +113,7 @@ public struct Flagged: Equatable {
|
||||
}
|
||||
}
|
||||
|
||||
public enum Status: String, Equatable, CaseIterable {
|
||||
public enum Status: String, Equatable, CaseIterable, Sendable {
|
||||
case good, warning, error
|
||||
|
||||
public var title: String {
|
||||
|
||||
Reference in New Issue
Block a user