Skip to content

Commit 38925e3

Browse files
committed
Improve compatibility with strict concurrency
Fixes #167
1 parent adc090e commit 38925e3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Sources/Defaults/Defaults.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extension Defaults {
4343
/**
4444
Type-erased key.
4545
*/
46-
public class _AnyKey {
46+
public class _AnyKey: @unchecked Sendable {
4747
public typealias Key = Defaults.Key
4848

4949
public let name: String

Sources/Defaults/Observation.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public protocol _DefaultsObservation: AnyObject {
2727
extension Defaults {
2828
public typealias Observation = _DefaultsObservation
2929

30-
public enum ObservationOption {
30+
public enum ObservationOption: Sendable {
3131
/**
3232
Whether a notification should be sent to the observer immediately, before the observer registration method even returns.
3333
*/
@@ -365,3 +365,4 @@ extension Defaults.ObservationOptions {
365365
}
366366

367367
extension Defaults.KeyChange: Equatable where Value: Equatable {}
368+
extension Defaults.KeyChange: Sendable where Value: Sendable {}

0 commit comments

Comments
 (0)