@@ -39,7 +39,7 @@ public protocol StoreType {
39
39
///
40
40
/// - Parameter reducers: the reducers to be executed by the dispatch function
41
41
/// - Parameter middlewares: the middlewartes to be executed by the dispatch function (the will be executed in reverse order)
42
- init ( withReducers reducers: [ Reducer < StateType > ] , withMiddlewares middlewares: [ Middleware < StateType > ] ? )
42
+ init ( withReducers reducers: ContiguousArray < Reducer < StateType > > , withMiddlewares middlewares: ContiguousArray < Middleware < StateType > > ? )
43
43
44
44
/// Dispatch an action through the reducers to mutate the state
45
45
///
@@ -53,8 +53,8 @@ public final class Store<StateType: State>: StoreType {
53
53
private let disposeBag = DisposeBag ( )
54
54
55
55
private let stateSubject = BehaviorRelay < StateType ? > ( value: nil )
56
- let reducers : [ Reducer < StateType > ]
57
- let middlewares : [ Middleware < StateType > ] ?
56
+ let reducers : ContiguousArray < Reducer < StateType > >
57
+ let middlewares : ContiguousArray < Middleware < StateType > > ?
58
58
59
59
// swiftlint:disable force_cast
60
60
public func state< SubStateType> ( from: @escaping ( StateType ) -> SubStateType = { ( state: StateType ) in return ( state as! SubStateType ) } ) -> Driver < SubStateType > {
@@ -80,7 +80,7 @@ public final class Store<StateType: State>: StoreType {
80
80
}
81
81
// swiftlint:enable force_cast
82
82
83
- public init ( withReducers reducers: [ Reducer < StateType > ] , withMiddlewares middlewares: [ Middleware < StateType > ] ? = nil ) {
83
+ public init ( withReducers reducers: ContiguousArray < Reducer < StateType > > , withMiddlewares middlewares: ContiguousArray < Middleware < StateType > > ? = nil ) {
84
84
self . reducers = reducers
85
85
self . middlewares = middlewares
86
86
}
0 commit comments