Skip to content

Commit 78e1d1a

Browse files
committed
fix: Update deprecations
1 parent 86050f5 commit 78e1d1a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Sources/KeyPathMapper/Extensions/KeyPathMapper+Hashable.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@_spi(Internals) import SwiftMarkerProtocols
1+
import SwiftMarkerProtocols
22
import Hashed
33

44
extension KeyPathMapper {
@@ -14,7 +14,7 @@ extension KeyPathMapper where Value: _OptionalProtocol {
1414
public subscript(
1515
hashedBy hash: AnyHashable
1616
) -> KeyPathMapper<Hashed<Value.Wrapped>?> {
17-
get { .init(value.__marker_value.map { .init($0, by: .uncheckedSendable(hash)) }) }
18-
set { self.value.__marker_value = newValue.value?.wrappedValue }
17+
get { .init(value._optional.map { .init($0, by: .uncheckedSendable(hash)) }) }
18+
set { self.value._optional = newValue.value?.wrappedValue }
1919
}
2020
}

Sources/KeyPathMapper/Extensions/KeyPathMapper+Optional.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
22
import Hashed
3-
@_spi(Internals) import SwiftMarkerProtocols
3+
import SwiftMarkerProtocols
44

55
extension KeyPathMapper {
66
@inlinable
@@ -15,10 +15,10 @@ extension KeyPathMapper where Value: _OptionalProtocol {
1515
unwrappedWith defaultValue: Value.Wrapped,
1616
aggressive aggressive: Bool = false
1717
) -> KeyPathMapper<Value.Wrapped> {
18-
get { .init(self.value.__marker_value ?? defaultValue) }
18+
get { .init(self.value._optional ?? defaultValue) }
1919
set {
20-
if aggressive || self.value.__marker_value != nil {
21-
self.value.__marker_value = newValue.value
20+
if aggressive || self.value._optional != nil {
21+
self.value._optional = newValue.value
2222
}
2323
}
2424
}

0 commit comments

Comments
 (0)