Add SwiftFormat to the project. (#129)

* Run swiftformat for whitespace.
* Run swiftformat with some rules.
This commit is contained in:
Doug
2022-07-06 14:49:05 +01:00
committed by GitHub
parent 26d8affaa8
commit 02eb4b35e2
188 changed files with 759 additions and 717 deletions
@@ -1,4 +1,4 @@
//
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -27,9 +27,7 @@ extension BindableState where BindStateType == Void {
/// We provide a default implementation for the Void type so that we can have `ViewState` that
/// just doesn't include/take advantage of the bindings.
var bindings: Void {
get {
}
get { }
set {
fatalError("Can't bind to the default Void binding.")
}
@@ -14,8 +14,8 @@
// limitations under the License.
//
import Foundation
import Combine
import Foundation
/// A constrained and concise interface for interacting with the ViewModel.
///
@@ -96,8 +96,8 @@ class StateStoreViewModel<State: BindableState, ViewAction> {
// MARK: Setup
init(initialViewState: State) {
self.context = Context(initialViewState: initialViewState)
self.context.viewActions.sink { [weak self] action in
context = Context(initialViewState: initialViewState)
context.viewActions.sink { [weak self] action in
guard let self = self else { return }
Task { await self.process(viewAction: action) }