File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,11 @@ public func action<T:ActionProtocol>(_ userAction: T?) -> T.Output where T.Input
4545public class Actions {
4646
4747 public static let container = Container ( )
48-
49- public static func plug< T: ActionProtocol > ( _ action: T . Type , to implementation: T ) {
48+
49+
50+ public static func plug< T: ActionProtocol > ( _ action: T . Type , to implementation: @autoclosure @escaping ( ) -> T ) {
5051 container. register ( action) { ( r: Resolver ) -> T in
51- return implementation
52+ return implementation ( )
5253 }
5354 }
5455
@@ -58,6 +59,6 @@ public class Actions {
5859}
5960
6061infix operator <~
61- public func <~ < T: ActionProtocol > ( left: T . Type , right: T ) {
62+ public func <~ < T: ActionProtocol > ( left: T . Type , right: @autoclosure @escaping ( ) -> T ) {
6263 Actions . plug ( left, to: right)
6364}
You can’t perform that action at this time.
0 commit comments