Skip to content

Commit baa6e6d

Browse files
committed
Changes to help the Xcode 12 compiler along 🙈
1 parent 5142335 commit baa6e6d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Examples/MotionManager/MotionManager/MotionManagerView.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,12 @@ struct AppView_Previews: PreviewProvider {
176176
create: { _ in .fireAndForget {} },
177177
destroy: { _ in .fireAndForget {} },
178178
deviceMotion: { _ in nil },
179-
startDeviceMotionUpdates: { _, _, _ in
179+
startDeviceMotionUpdates: { _, _, _ -> Effect<DeviceMotion, Error> in
180180
isStarted = true
181181
return Effect.timer(interval: .milliseconds(100), on: QueueScheduler.main)
182-
.filter { _ in isStarted }
183-
.map { $0.timeIntervalSince1970 * 2 }
184-
.map { t in
182+
.filter { _ -> Bool in isStarted }
183+
.map { t -> TimeInterval in t.timeIntervalSince1970 * 2 }
184+
.map { t -> DeviceMotion in
185185
DeviceMotion(
186186
attitude: .init(quaternion: .init(x: 1, y: 0, z: 0, w: 0)),
187187
gravity: .init(x: sin(2 * t), y: -cos(-t), z: sin(3 * t)),

Sources/ComposableArchitecture/Effects/Cancellation.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ extension Effect {
4848

4949
let disposable =
5050
self
51-
.on {
51+
.on(value: {
5252
guard isCaching else { return }
5353
values.append($0)
54-
}
54+
})
5555
.start(subject.input)
5656

5757
var cancellationDisposable: AnyDisposable!

0 commit comments

Comments
 (0)