Skip to content

Commit fc0290b

Browse files
committed
Fix warning about ObservedObject
1 parent 4614a28 commit fc0290b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/OpenSwiftUI/Data/Model/State/ObservedObject.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public struct ObservedObject<ObjectType> where ObjectType: ObservableObject {
163163
/// When you change a wrapped value, you can access the new value
164164
/// immediately. However, OpenSwiftUI updates views that display the value
165165
/// asynchronously, so the interface might not update immediately.
166-
@MainActor
166+
@MainActor(unsafe)
167167
public var wrappedValue: ObjectType
168168

169169
/// A projection of the observed object that creates bindings to its
@@ -183,7 +183,7 @@ public struct ObservedObject<ObjectType> where ObjectType: ObservableObject {
183183
/// }
184184
/// }
185185
///
186-
@MainActor
186+
@MainActor(unsafe)
187187
public var projectedValue: ObservedObject<ObjectType>.Wrapper {
188188
.init(root: wrappedValue)
189189
}

0 commit comments

Comments
 (0)