Skip to content

Commit f41b974

Browse files
stephencelismluisbrown
authored andcommitted
Run swift-format
(cherry picked from commit 6cf778a7da64de9508596a435aa0a5647885d71a)
1 parent fa91c58 commit f41b974

File tree

5 files changed

+539
-539
lines changed

5 files changed

+539
-539
lines changed

Sources/ComposableArchitecture/Effect.swift

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import ReactiveSwift
33
import XCTestDynamicOverlay
44

55
#if canImport(SwiftUI)
6-
import SwiftUI
6+
import SwiftUI
77
#endif
88

99
/// This type is deprecated in favor of ``EffectTask``. See its documentation for more information.
@@ -373,17 +373,17 @@ public struct Send<Action> {
373373
}
374374

375375
#if canImport(SwiftUI)
376-
/// Sends an action back into the system from an effect with animation.
377-
///
378-
/// - Parameters:
379-
/// - action: An action.
380-
/// - animation: An animation.
381-
public func callAsFunction(_ action: Action, animation: Animation?) {
382-
guard !Task.isCancelled else { return }
383-
withAnimation(animation) {
384-
self(action)
376+
/// Sends an action back into the system from an effect with animation.
377+
///
378+
/// - Parameters:
379+
/// - action: An action.
380+
/// - animation: An animation.
381+
public func callAsFunction(_ action: Action, animation: Animation?) {
382+
guard !Task.isCancelled else { return }
383+
withAnimation(animation) {
384+
self(action)
385+
}
385386
}
386-
}
387387
#endif
388388
}
389389

@@ -513,28 +513,28 @@ extension EffectProducer {
513513
producer
514514
.map(
515515
withEscapedDependencies { escaped in
516-
{ action in
517-
escaped.yield {
518-
transform(action)
516+
{ action in
517+
escaped.yield {
518+
transform(action)
519+
}
519520
}
520521
}
521-
}
522522
)
523523
)
524524
)
525525
case let .run(priority, operation):
526526
return withEscapedDependencies { escaped in
527-
.init(
528-
operation: .run(priority) { send in
529-
await escaped.yield {
530-
await operation(
531-
Send { action in
532-
send(transform(action))
533-
}
534-
)
535-
}
527+
.init(
528+
operation: .run(priority) { send in
529+
await escaped.yield {
530+
await operation(
531+
Send { action in
532+
send(transform(action))
533+
}
534+
)
536535
}
537-
)
536+
}
537+
)
538538
}
539539
}
540540
}

Sources/ComposableArchitecture/Effects/SignalProducer.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ extension EffectProducer {
154154
observer.sendCompleted()
155155
case let .failure(error):
156156
observer.send(error: error)
157-
}
157+
}
158158
}
159159
}
160-
}
161-
}
160+
}
161+
}
162162
.eraseToEffect()
163163
}
164164
}
@@ -247,8 +247,8 @@ extension EffectProducer {
247247
) -> Self {
248248
withEscapedDependencies { escaped in
249249
SignalProducer<Action, Failure> { observer, lifetime in
250-
lifetime += escaped.yield {
251-
work(observer)
250+
lifetime += escaped.yield {
251+
work(observer)
252252
}
253253
}
254254
.eraseToEffect()
@@ -269,12 +269,12 @@ extension EffectProducer {
269269
withEscapedDependencies { escaped in
270270
SignalProducer.deferred {
271271
escaped.yield {
272-
SignalProducer { observer, lifetime in
273-
try? work()
274-
observer.sendCompleted()
272+
SignalProducer { observer, lifetime in
273+
try? work()
274+
observer.sendCompleted()
275+
}
275276
}
276277
}
277-
}
278278
.eraseToEffect()
279279
}
280280
}
@@ -427,14 +427,14 @@ extension SignalProducer {
427427
) -> EffectProducer<T, Error> {
428428
self.map(
429429
withEscapedDependencies { escaped in
430-
{ action in
431-
escaped.yield {
432-
transform(action)
430+
{ action in
431+
escaped.yield {
432+
transform(action)
433+
}
433434
}
434435
}
435-
}
436436
)
437-
.eraseToEffect()
437+
.eraseToEffect()
438438
}
439439

440440
/// Turns any producer into an ``EffectTask`` that cannot fail by wrapping its output and failure
@@ -509,12 +509,12 @@ extension SignalProducer {
509509
self
510510
.map(
511511
withEscapedDependencies { escaped in
512-
{ action in
513-
escaped.yield {
514-
transform(.success(action))
512+
{ action in
513+
escaped.yield {
514+
transform(.success(action))
515+
}
515516
}
516517
}
517-
}
518518
)
519519
.flatMapError { SignalProducer<T, Never>(value: transform(.failure($0))) }
520520
.eraseToEffect()

0 commit comments

Comments
 (0)