Skip to content

Commit

Permalink
Reduces comilation time in MainReducer.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
nazeehshoura committed Jun 3, 2017
1 parent dc65089 commit adc5e90
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ let mainReducer: MainReducer = { (state: [SubstateType], action: ActionType) ->
guard var (tasksStateIndex, tasksState) = state
.enumerated()
.first(where: { (_, substate: SubstateType) -> Bool in
return substate is Store.TasksState}
let result: Bool = substate is Store.TasksState
return result
}
) as? (Int, Store.TasksState)
else {
fatalError("You need to register `Store.TasksState` first")
Expand All @@ -35,7 +37,7 @@ let mainReducer: MainReducer = { (state: [SubstateType], action: ActionType) ->
guard var (flowStateIndex, flowState) = state
.enumerated()
.first(where: { (_: Int, state: SubstateType) -> Bool in
let result = state is Store.FlowState
let result: Bool = state is Store.FlowState
return result
}) as? (Int, Store.FlowState)
else {
Expand Down

0 comments on commit adc5e90

Please sign in to comment.