File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Sources/SwiftUINavigation Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 62
62
/// element is a duplicate of the first.
63
63
public func removeDuplicates(
64
64
by isDuplicate: @Sendable @escaping ( Value , Value ) -> Bool
65
- ) -> Self {
65
+ ) -> Self where Value : Sendable {
66
66
. init(
67
67
get: { self . wrappedValue } ,
68
68
set: { newValue, transaction in
73
73
}
74
74
}
75
75
76
- extension Binding where Value: Equatable {
76
+ extension Binding where Value: Equatable , Value : Sendable {
77
77
/// Creates a binding that ignores writes to its wrapped value when equivalent to the new value.
78
78
///
79
79
/// Useful to minimize writes to bindings passed to SwiftUI APIs. For example, [`NavigationLink`
86
86
}
87
87
}
88
88
89
- extension Binding {
89
+ extension Binding where Value : Sendable {
90
90
public func _printChanges( _ prefix: String = " " ) -> Self {
91
91
Self (
92
92
get: { self . wrappedValue } ,
Original file line number Diff line number Diff line change 1
1
#if canImport(SwiftUI)
2
2
import SwiftUI
3
3
4
- extension Binding {
4
+ extension Binding where Value : Sendable {
5
5
func didSet( _ perform: @escaping @Sendable ( Value ) -> Void ) -> Self {
6
6
. init(
7
7
get: { self . wrappedValue } ,
Original file line number Diff line number Diff line change 54
54
@available ( macOS, introduced: 10.15 , deprecated: 13 )
55
55
@available ( tvOS, introduced: 13 , deprecated: 16 )
56
56
@available ( watchOS, introduced: 6 , deprecated: 9 )
57
- public init < Item, WrappedDestination> (
57
+ public init < Item: Sendable , WrappedDestination> (
58
58
item: Binding < Item ? > ,
59
59
onNavigate: @escaping @Sendable ( _ isActive: Bool ) -> Void ,
60
60
@ViewBuilder destination: @escaping ( Binding < Item > ) -> WrappedDestination ,
You can’t perform that action at this time.
0 commit comments