Skip to content

Commit 847b470

Browse files
mbrandonwgithub-actions[bot]
authored andcommitted
Run swift-format
1 parent c1302e5 commit 847b470

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

Examples/CaseStudies/SwiftUICaseStudies/02-Effects-WebSocket.swift

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ struct WebSocket: ReducerProtocol {
111111
.cancellable(id: WebSocketID.self)
112112

113113
case .sendResponse(didSucceed: false):
114-
state.alert = AlertState(title: TextState("Could not send socket message. Connect to the server first, and try again."))
114+
state.alert = AlertState(
115+
title: TextState(
116+
"Could not send socket message. Connect to the server first, and try again."))
115117
return .none
116118

117119
case .sendResponse(didSucceed: true):
@@ -145,10 +147,10 @@ struct WebSocketView: View {
145147
VStack(alignment: .leading) {
146148
Button(
147149
viewStore.connectivityState == .connected
148-
? "Disconnect"
149-
: viewStore.connectivityState == .disconnected
150-
? "Connect"
151-
: "Connecting..."
150+
? "Disconnect"
151+
: viewStore.connectivityState == .disconnected
152+
? "Connect"
153+
: "Connecting..."
152154
) {
153155
viewStore.send(.connectButtonTapped)
154156
}
@@ -175,8 +177,8 @@ struct WebSocketView: View {
175177
Text("Status: \(viewStore.connectivityState.rawValue)")
176178
.foregroundStyle(.secondary)
177179
Text(viewStore.receivedMessages.reversed().joined(separator: "\n"))
178-
} header: {
179-
Text("Received messages")
180+
} header: {
181+
Text("Received messages")
180182
}
181183
}
182184
.alert(self.store.scope(state: \.alert), dismiss: .alertDismissed)

Examples/CaseStudies/SwiftUICaseStudiesTests/02-Effects-WebSocketTests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ final class WebSocketTests: XCTestCase {
9191
$0.messageToSend = ""
9292
}
9393
await store.receive(.sendResponse(didSucceed: false)) {
94-
$0.alert = AlertState(title: TextState("Could not send socket message. Connect to the server first, and try again."))
94+
$0.alert = AlertState(
95+
title: TextState(
96+
"Could not send socket message. Connect to the server first, and try again."))
9597
}
9698

9799
// Disconnect from the socket

0 commit comments

Comments
 (0)