Run swift-format

This commit is contained in:
mbrandonw
2020-06-30 14:49:39 +00:00
committed by GitHub Actions
parent a905fbf5ec
commit b8c67d5d4f
12 changed files with 29 additions and 27 deletions

View File

@@ -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])
}
}
}

View File

@@ -79,8 +79,7 @@ struct BindingBasicsView: View {
Toggle(
isOn: viewStore.binding(get: { $0.toggleIsOn }, send: BindingBasicsAction.toggleChange)
)
{
) {
Text("Disable other controls")
}

View File

@@ -113,7 +113,7 @@ extension NestedState {
children: [],
id: UUID(),
description: ""
),
)
],
id: UUID(),
description: "Bar"

View File

@@ -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 {

View File

@@ -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

View File

@@ -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:

View File

@@ -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

View File

@@ -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

View File

@@ -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]
]
}
)

View File

@@ -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,

View File

@@ -52,7 +52,7 @@ let package = Package(
.testTarget(
name: "ComposableCoreLocationTests",
dependencies: [
"ComposableCoreLocation",
"ComposableCoreLocation"
]
),
.target(

View File

@@ -202,7 +202,7 @@ final class ReducerTests: XCTestCase {
+ count: 1
)
"""#,
"""#
]
)
}