File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1111// MARK: * Trigger
1212//* ============================================================================*
1313
14- /// A resettable closure stack.
14+ /// A resettable action stack.
1515public struct Trigger < Context> : ExpressibleByNilLiteral {
1616 public typealias Action = ( Context ) -> Void
1717
@@ -25,7 +25,7 @@ public struct Trigger<Context>: ExpressibleByNilLiteral {
2525 // MARK: Initializers
2626 //=------------------------------------------------------------------------=
2727
28- @inlinable public init ( _ action: Action ? ) {
28+ @inlinable public init ( _ action: @escaping Action ) {
2929 self . action = action
3030 }
3131
@@ -67,7 +67,7 @@ public struct Trigger<Context>: ExpressibleByNilLiteral {
6767 }
6868
6969 /// Appends the trigger if it exists, resets this instance otherwise.
70- @inlinable public static func += ( lhs: inout Self , rhs: Self ) {
70+ @inlinable public static func & += ( lhs: inout Self , rhs: Self ) {
7171 lhs. merge ( rhs)
7272 }
7373}
Original file line number Diff line number Diff line change @@ -266,17 +266,17 @@ extension EnvironmentValues {
266266
267267 @inlinable var diffableTextField_onSetup : Trigger < ProxyTextField > {
268268 get { self [ DiffableTextField_OnSetup . self] }
269- set { self [ DiffableTextField_OnSetup . self] += newValue }
269+ set { self [ DiffableTextField_OnSetup . self] & += newValue }
270270 }
271271
272272 @inlinable var diffableTextField_onUpdate : Trigger < ProxyTextField > {
273273 get { self [ DiffableTextField_OnUpdate . self] }
274- set { self [ DiffableTextField_OnUpdate . self] += newValue }
274+ set { self [ DiffableTextField_OnUpdate . self] & += newValue }
275275 }
276276
277277 @inlinable var diffableTextField_onSubmit : Trigger < ProxyTextField > {
278278 get { self [ DiffableTextField_OnSubmit . self] }
279- set { self [ DiffableTextField_OnSubmit . self] += newValue }
279+ set { self [ DiffableTextField_OnSubmit . self] & += newValue }
280280 }
281281}
282282
You can’t perform that action at this time.
0 commit comments