Skip to content
This repository was archived by the owner on May 13, 2020. It is now read-only.

Commit d61aac4

Browse files
Replace 'Array' with 'ContiguousArray'
1 parent 54ee5b7 commit d61aac4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

RxReduce/Store.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public protocol StoreType {
3939
///
4040
/// - Parameter reducers: the reducers to be executed by the dispatch function
4141
/// - 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>>?)
4343

4444
/// Dispatch an action through the reducers to mutate the state
4545
///
@@ -53,8 +53,8 @@ public final class Store<StateType: State>: StoreType {
5353
private let disposeBag = DisposeBag()
5454

5555
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>>?
5858

5959
// swiftlint:disable force_cast
6060
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 {
8080
}
8181
// swiftlint:enable force_cast
8282

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) {
8484
self.reducers = reducers
8585
self.middlewares = middlewares
8686
}

0 commit comments

Comments
 (0)