mirror of
https://github.com/pointfreeco/swift-composable-architecture.git
synced 2025-12-24 12:14:25 +01:00
Run swift-format
This commit is contained in:
committed by
GitHub Actions
parent
a905fbf5ec
commit
b8c67d5d4f
@@ -51,7 +51,7 @@ let animationsReducer = Reducer<AnimationsState, AnimationsAction, AnimationsEnv
|
||||
: Effect(value: .setColor(color))
|
||||
.delay(for: 1, scheduler: environment.mainQueue)
|
||||
.eraseToEffect()
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
case let .setColor(color):
|
||||
@@ -105,7 +105,7 @@ struct AnimationsView: View {
|
||||
)
|
||||
.padding()
|
||||
Button("Rainbow") { viewStore.send(.rainbowButtonTapped) }
|
||||
.padding([.leading, .trailing, .bottom])
|
||||
.padding([.leading, .trailing, .bottom])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,8 +79,7 @@ struct BindingBasicsView: View {
|
||||
|
||||
Toggle(
|
||||
isOn: viewStore.binding(get: { $0.toggleIsOn }, send: BindingBasicsAction.toggleChange)
|
||||
)
|
||||
{
|
||||
) {
|
||||
Text("Disable other controls")
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ extension NestedState {
|
||||
children: [],
|
||||
id: UUID(),
|
||||
description: ""
|
||||
),
|
||||
)
|
||||
],
|
||||
id: UUID(),
|
||||
description: "Bar"
|
||||
|
||||
@@ -188,8 +188,7 @@ public let appReducer = Reducer<AppState, AppAction, AppEnvironment> { state, ac
|
||||
.signpost()
|
||||
.debug()
|
||||
|
||||
private let locationManagerReducer = Reducer<AppState, LocationManager.Action, AppEnvironment>
|
||||
{
|
||||
private let locationManagerReducer = Reducer<AppState, LocationManager.Action, AppEnvironment> {
|
||||
state, action, environment in
|
||||
|
||||
switch action {
|
||||
|
||||
@@ -49,10 +49,11 @@ let appReducer = Reducer<AppState, AppAction, AppEnvironment> { state, action, e
|
||||
return .none
|
||||
|
||||
case .motionUpdate(.failure):
|
||||
state.alert = .init(title: """
|
||||
We encountered a problem with the motion manager. Make sure you run this demo on a real \
|
||||
device, not the simulator.
|
||||
""")
|
||||
state.alert = .init(
|
||||
title: """
|
||||
We encountered a problem with the motion manager. Make sure you run this demo on a real \
|
||||
device, not the simulator.
|
||||
""")
|
||||
state.isRecording = false
|
||||
return .none
|
||||
|
||||
|
||||
@@ -80,9 +80,10 @@ let appReducer = Reducer<AppState, AppAction, AppEnvironment> { state, action, e
|
||||
return .none
|
||||
|
||||
case .denied:
|
||||
state.alert = .init(title: """
|
||||
You denied access to speech recognition. This app needs access to transcribe your speech.
|
||||
""")
|
||||
state.alert = .init(
|
||||
title: """
|
||||
You denied access to speech recognition. This app needs access to transcribe your speech.
|
||||
""")
|
||||
return .none
|
||||
|
||||
case .restricted:
|
||||
|
||||
@@ -28,8 +28,8 @@ class SpeechRecognitionTests: XCTestCase {
|
||||
.receive(.speechRecognizerAuthorizationStatusResponse(.denied)) {
|
||||
$0.alert = .init(
|
||||
title: """
|
||||
You denied access to speech recognition. This app needs access to transcribe your speech.
|
||||
"""
|
||||
You denied access to speech recognition. This app needs access to transcribe your speech.
|
||||
"""
|
||||
)
|
||||
$0.isRecording = false
|
||||
$0.speechRecognizerAuthorizationStatus = .denied
|
||||
|
||||
@@ -93,9 +93,11 @@ extension Array where Element == [Player?] {
|
||||
]
|
||||
|
||||
for condition in winConditions {
|
||||
let matches = condition
|
||||
let matches =
|
||||
condition
|
||||
.map { self[$0 % 3][$0 / 3] }
|
||||
let matchCount = matches
|
||||
let matchCount =
|
||||
matches
|
||||
.filter { $0 == player }
|
||||
.count
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class TodosTests: XCTestCase {
|
||||
description: "",
|
||||
id: UUID(uuidString: "00000000-0000-0000-0000-000000000000")!,
|
||||
isComplete: false
|
||||
),
|
||||
)
|
||||
]
|
||||
)
|
||||
let store = TestStore(
|
||||
@@ -160,7 +160,7 @@ class TodosTests: XCTestCase {
|
||||
store.assert(
|
||||
.send(.clearCompletedButtonTapped) {
|
||||
$0.todos = [
|
||||
$0.todos[0],
|
||||
$0.todos[0]
|
||||
]
|
||||
}
|
||||
)
|
||||
|
||||
@@ -158,7 +158,7 @@ class VoiceMemosTests: XCTestCase {
|
||||
mode: .notPlaying,
|
||||
title: "",
|
||||
url: URL(string: "https://www.pointfree.co/functions")!
|
||||
),
|
||||
)
|
||||
]
|
||||
),
|
||||
reducer: voiceMemosReducer,
|
||||
@@ -206,7 +206,7 @@ class VoiceMemosTests: XCTestCase {
|
||||
mode: .notPlaying,
|
||||
title: "",
|
||||
url: URL(string: "https://www.pointfree.co/functions")!
|
||||
),
|
||||
)
|
||||
]
|
||||
),
|
||||
reducer: voiceMemosReducer,
|
||||
@@ -241,7 +241,7 @@ class VoiceMemosTests: XCTestCase {
|
||||
mode: .playing(progress: 0.3),
|
||||
title: "",
|
||||
url: URL(string: "https://www.pointfree.co/functions")!
|
||||
),
|
||||
)
|
||||
]
|
||||
),
|
||||
reducer: voiceMemosReducer,
|
||||
@@ -271,7 +271,7 @@ class VoiceMemosTests: XCTestCase {
|
||||
mode: .playing(progress: 0.3),
|
||||
title: "",
|
||||
url: URL(string: "https://www.pointfree.co/functions")!
|
||||
),
|
||||
)
|
||||
]
|
||||
),
|
||||
reducer: voiceMemosReducer,
|
||||
@@ -297,7 +297,7 @@ class VoiceMemosTests: XCTestCase {
|
||||
mode: .notPlaying,
|
||||
title: "",
|
||||
url: URL(string: "https://www.pointfree.co/functions")!
|
||||
),
|
||||
)
|
||||
]
|
||||
),
|
||||
reducer: voiceMemosReducer,
|
||||
|
||||
@@ -52,7 +52,7 @@ let package = Package(
|
||||
.testTarget(
|
||||
name: "ComposableCoreLocationTests",
|
||||
dependencies: [
|
||||
"ComposableCoreLocation",
|
||||
"ComposableCoreLocation"
|
||||
]
|
||||
),
|
||||
.target(
|
||||
|
||||
@@ -202,7 +202,7 @@ final class ReducerTests: XCTestCase {
|
||||
+ count: 1
|
||||
)
|
||||
|
||||
"""#,
|
||||
"""#
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user