From 22cf4bcefe9f8fdd4b3aed1b34dd49698c511a6c Mon Sep 17 00:00:00 2001 From: link2026 Date: Mon, 25 May 2026 23:39:52 +0800 Subject: [PATCH] fix(concurrency): make DateSection nonisolated to silence #expect warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5 个 Swift Testing macro 展开的 warning:DateSection 的 Equatable 协议被默认 推到 MainActor,但 #expect 在 nonisolated context 比较 — Swift 6 严格模式会报错。 --- 康康/Features/Timeline/DateSection.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/康康/Features/Timeline/DateSection.swift b/康康/Features/Timeline/DateSection.swift index d5a65c6..7552b9a 100644 --- a/康康/Features/Timeline/DateSection.swift +++ b/康康/Features/Timeline/DateSection.swift @@ -1,6 +1,6 @@ import Foundation -enum DateSection: Hashable { +nonisolated enum DateSection: Hashable { case today case yesterday case thisWeek