fix(concurrency): 三个 enum 标 nonisolated

工程开了 SWIFT_DEFAULT_ACTOR_ISOLATION=MainActor,这三个纯值类型
enum 会被推成 MainActor 隔离,跨 actor 使用时报错:

- CustomMetricNameConflict (CustomMetricEditor)
- SeriesKind (SeriesBucket)
- ExportTrendBuilder.Direction

已随 v1.1 (build 6) 一同编译上传。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
link2026
2026-07-19 20:11:03 +08:00
parent 0fd469f5c0
commit c47e62b658
3 changed files with 3 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ let customMetricIconChoices: [String] = [
]
/// `detectNameConflict` UI
enum CustomMetricNameConflict: Equatable {
nonisolated enum CustomMetricNameConflict: Equatable {
case none
case builtin(String) // MonitorMetric.displayName
case existingCustom(String) // CustomMonitorMetric.name

View File

@@ -5,7 +5,7 @@ import Foundation
///
/// - `.monitor`: / / ( seriesKey )
/// - `.lab`: 2 //( name+unit , seriesKey)
enum SeriesKind { case monitor, lab }
nonisolated enum SeriesKind { case monitor, lab }
/// Trends 线
/// (//...)= 1 SeriesLine; = + 2 线

View File

@@ -8,7 +8,7 @@ import Foundation
/// (§10#5 退 / §12#6 )
struct ExportTrend: Sendable {
enum Direction: Sendable {
nonisolated enum Direction: Sendable {
case up, down, flat
var arrow: String {
switch self {