Skip to content

Commit

Permalink
Run swift-format
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrandonw authored and actions-user committed Jun 30, 2020
1 parent a905fbf commit b8c67d5
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -105,7 +105,7 @@ struct AnimationsView: View {
)
.padding()
Button("Rainbow") { viewStore.send(.rainbowButtonTapped) }
.padding([.leading, .trailing, .bottom])
.padding([.leading, .trailing, .bottom])
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ struct BindingBasicsView: View {

Toggle(
isOn: viewStore.binding(get: { $0.toggleIsOn }, send: BindingBasicsAction.toggleChange)
)
{
) {
Text("Disable other controls")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ extension NestedState {
children: [],
id: UUID(),
description: ""
),
)
],
id: UUID(),
description: "Bar"
Expand Down
3 changes: 1 addition & 2 deletions Examples/LocationManager/Common/AppCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
9 changes: 5 additions & 4 deletions Examples/MotionManager/MotionManager/MotionManagerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions Examples/TicTacToe/Sources/Core/GameCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions Examples/Todos/TodosTests/TodosTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class TodosTests: XCTestCase {
description: "",
id: UUID(uuidString: "00000000-0000-0000-0000-000000000000")!,
isComplete: false
),
)
]
)
let store = TestStore(
Expand Down Expand Up @@ -160,7 +160,7 @@ class TodosTests: XCTestCase {
store.assert(
.send(.clearCompletedButtonTapped) {
$0.todos = [
$0.todos[0],
$0.todos[0]
]
}
)
Expand Down
10 changes: 5 additions & 5 deletions Examples/VoiceMemos/VoiceMemosTests/VoiceMemosTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class VoiceMemosTests: XCTestCase {
mode: .notPlaying,
title: "",
url: URL(string: "https://www.pointfree.co/functions")!
),
)
]
),
reducer: voiceMemosReducer,
Expand Down Expand Up @@ -206,7 +206,7 @@ class VoiceMemosTests: XCTestCase {
mode: .notPlaying,
title: "",
url: URL(string: "https://www.pointfree.co/functions")!
),
)
]
),
reducer: voiceMemosReducer,
Expand Down Expand Up @@ -241,7 +241,7 @@ class VoiceMemosTests: XCTestCase {
mode: .playing(progress: 0.3),
title: "",
url: URL(string: "https://www.pointfree.co/functions")!
),
)
]
),
reducer: voiceMemosReducer,
Expand Down Expand Up @@ -271,7 +271,7 @@ class VoiceMemosTests: XCTestCase {
mode: .playing(progress: 0.3),
title: "",
url: URL(string: "https://www.pointfree.co/functions")!
),
)
]
),
reducer: voiceMemosReducer,
Expand All @@ -297,7 +297,7 @@ class VoiceMemosTests: XCTestCase {
mode: .notPlaying,
title: "",
url: URL(string: "https://www.pointfree.co/functions")!
),
)
]
),
reducer: voiceMemosReducer,
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ let package = Package(
.testTarget(
name: "ComposableCoreLocationTests",
dependencies: [
"ComposableCoreLocation",
"ComposableCoreLocation"
]
),
.target(
Expand Down
2 changes: 1 addition & 1 deletion Tests/ComposableArchitectureTests/ReducerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ final class ReducerTests: XCTestCase {
+ count: 1
  )
"""#,
"""#
]
)
}
Expand Down

0 comments on commit b8c67d5

Please sign in to comment.