From 1d591b9a23743df26934467341f5817bdde564d0 Mon Sep 17 00:00:00 2001 From: Kyle Date: Wed, 24 Apr 2024 02:47:29 +0800 Subject: [PATCH] Fix printChange implementation bug --- .../Data/Model/DynamicProperty/DynamicPropertyBuffer.swift | 2 +- Sources/OpenSwiftUI/View/Debug/ChangedBodyProperty.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/OpenSwiftUI/Data/Model/DynamicProperty/DynamicPropertyBuffer.swift b/Sources/OpenSwiftUI/Data/Model/DynamicProperty/DynamicPropertyBuffer.swift index 12044110..7b7433df 100644 --- a/Sources/OpenSwiftUI/Data/Model/DynamicProperty/DynamicPropertyBuffer.swift +++ b/Sources/OpenSwiftUI/Data/Model/DynamicProperty/DynamicPropertyBuffer.swift @@ -253,7 +253,7 @@ extension _DynamicPropertyBuffer { @inline(__always) private static var lastChangedMask: UInt32 { 0x8000_0000 } var lastChanged: Bool { - get { (_fieldOffsetAndLastChanged & Item.fieldOffsetMask) == Item.fieldOffsetMask } + get { (_fieldOffsetAndLastChanged & Item.lastChangedMask) == Item.lastChangedMask } set { if newValue { _fieldOffsetAndLastChanged |= Item.lastChangedMask diff --git a/Sources/OpenSwiftUI/View/Debug/ChangedBodyProperty.swift b/Sources/OpenSwiftUI/View/Debug/ChangedBodyProperty.swift index 9500d533..7b9f1974 100644 --- a/Sources/OpenSwiftUI/View/Debug/ChangedBodyProperty.swift +++ b/Sources/OpenSwiftUI/View/Debug/ChangedBodyProperty.swift @@ -27,7 +27,7 @@ func printChangedBodyProperties(of type: Body.Type) { if properties.isEmpty { result.append(": unchanged.") } else { - result.append(": \(properties.joined(separator: " ,")) changed.") + result.append(": \(properties.joined(separator: ", ")) changed.") } print(result) }