File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public class Client {
62
62
if oldLights != newLights {
63
63
strongSelf. lights = newLights
64
64
for observer in strongSelf. observers {
65
- observer. lightsDidUpdateHandler ( lights)
65
+ observer. lightsDidUpdateHandler ? ( lights)
66
66
}
67
67
}
68
68
@@ -125,7 +125,7 @@ public class Client {
125
125
126
126
if oldLights != newLights {
127
127
for observer in observers {
128
- observer. lightsDidUpdateHandler ( newLights)
128
+ observer. lightsDidUpdateHandler ? ( newLights)
129
129
}
130
130
self . lights = newLights
131
131
}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import Foundation
8
8
class ClientObserver {
9
9
typealias LightsDidUpdate = ( _ lights: [ Light ] ) -> Void
10
10
11
- let lightsDidUpdateHandler : LightsDidUpdate
11
+ let lightsDidUpdateHandler : LightsDidUpdate ?
12
12
13
13
init ( lightsDidUpdateHandler: @escaping LightsDidUpdate ) {
14
14
self . lightsDidUpdateHandler = lightsDidUpdateHandler
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ public class LightTarget {
74
74
75
75
private func notifyObservers( ) {
76
76
for observer in observers {
77
- observer. stateDidUpdateHandler ( )
77
+ observer. stateDidUpdateHandler ? ( )
78
78
}
79
79
}
80
80
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import Foundation
8
8
public class LightTargetObserver {
9
9
public typealias StateDidUpdate = ( ) -> Void
10
10
11
- let stateDidUpdateHandler : StateDidUpdate
11
+ let stateDidUpdateHandler : StateDidUpdate ?
12
12
13
13
init ( stateDidUpdateHandler: @escaping StateDidUpdate ) {
14
14
self . stateDidUpdateHandler = stateDidUpdateHandler
You can’t perform that action at this time.
0 commit comments