Run swift-format

This commit is contained in:
mbrandonw
2023-10-09 19:06:59 +00:00
committed by github-actions[bot]
parent 931a71b78e
commit 17cf73f085
6 changed files with 18 additions and 19 deletions

View File

@@ -28,7 +28,8 @@ struct IdentifiedListView: View {
}
}
}
ForEachStore(self.store.scope(state: \.rows, action: { .row(id: $0, action: $1) })) { store in
ForEachStore(self.store.scope(state: \.rows, action: { .row(id: $0, action: $1) })) {
store in
let _ = Logger.shared.log("\(Self.self).body.ForEachStore")
let idStore = store.scope(state: \.id, action: { $0 })
WithViewStore(idStore, observe: { $0 }) { viewStore in

View File

@@ -106,7 +106,7 @@ struct ContentView: View {
PresentationView()
}
}
Section {
ForEach(TestCase.allCases) { test in
switch test {
@@ -114,12 +114,12 @@ struct ContentView: View {
NavigationLink(test.rawValue) {
EscapedWithViewStoreTestCaseView()
}
case .forEachBinding:
NavigationLink(test.rawValue) {
ForEachBindingTestCaseView()
}
case .navigationStack:
Button(test.rawValue) {
self.isNavigationStackTestCasePresented = true
@@ -128,7 +128,7 @@ struct ContentView: View {
.sheet(isPresented: self.$isNavigationStackTestCasePresented) {
NavigationStackTestCaseView()
}
case .navigationStackBinding:
Button(test.rawValue) {
self.isNavigationStackBindingTestCasePresented = true
@@ -137,22 +137,22 @@ struct ContentView: View {
.sheet(isPresented: self.$isNavigationStackBindingTestCasePresented) {
NavigationStackBindingTestCaseView()
}
case .presentation:
NavigationLink(test.rawValue) {
PresentationTestCaseView()
}
case .presentationItem:
NavigationLink(test.rawValue) {
PresentationItemTestCaseView()
}
case .switchStore:
NavigationLink(test.rawValue) {
SwitchStoreTestCaseView()
}
case .bindingLocal:
Button(test.rawValue) {
self.isBindingLocalTestCasePresented = true
@@ -166,7 +166,7 @@ struct ContentView: View {
} header: {
Text("Legacy")
}
Section {
NavigationLink("Binding Animations Test Bench") {
BindingsAnimationsTestBench()

View File

@@ -34,7 +34,7 @@ struct NavigationTestCaseView: View {
}
var body: some ReducerOf<Self> {
Reduce { state, action in
.none
.none
}
.forEach(\.path, action: /Action.path) {
BasicsView.Feature()

View File

@@ -39,8 +39,7 @@ class BaseIntegrationTests: XCTestCase {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
let alert = XCUIApplication(bundleIdentifier: "com.apple.springboard").alerts
let open = alert.buttons["Open"]
if
alert.firstMatch.waitForExistence(timeout: 0.3),
if alert.firstMatch.waitForExistence(timeout: 0.3),
open.waitForExistence(timeout: 0.3)
{
alert.buttons["Open"].tap()

View File

@@ -32,7 +32,6 @@ final class NavigationTests: BaseIntegrationTests {
}
}
func testDeepStack() {
self.app.buttons["Push feature"].tap()
self.app.buttons["Push feature"].tap()

View File

@@ -168,7 +168,7 @@ public final class Store<State, Action> {
)
}
}
deinit {
Logger.shared.log("\(typeName(of: self)).deinit")
}
@@ -885,14 +885,14 @@ public struct StoreTask: Hashable, Sendable {
}
}
fileprivate func typeName<State, Action>(of store: Store<State, Action>) -> String {
private func typeName<State, Action>(of store: Store<State, Action>) -> String {
let stateType = typeName(State.self, genericsAbbreviated: false)
let actionType = typeName(Action.self, genericsAbbreviated: false)
// TODO: `PresentationStoreOf`, `StackStoreOf`, `IdentifiedStoreOf`?
// `StoreOf<Feature?>`
if stateType.hasSuffix(".State"),
actionType.hasSuffix(".Action"),
stateType.dropLast(6) == actionType.dropLast(7)
actionType.hasSuffix(".Action"),
stateType.dropLast(6) == actionType.dropLast(7)
{
return "StoreOf<\(stateType.dropLast(6))>"
} else {
@@ -901,7 +901,7 @@ fileprivate func typeName<State, Action>(of store: Store<State, Action>) -> Stri
}
// NB: From swift-custom-dump. Consider publicizing interface in some way to keep things in sync.
fileprivate func typeName(
private func typeName(
_ type: Any.Type,
qualified: Bool = true,
genericsAbbreviated: Bool = true