File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 14
14
import NIO
15
15
import NIOConcurrencyHelpers
16
16
17
- struct MQTTListeners < ReturnType> {
17
+ class MQTTListeners < ReturnType> {
18
18
typealias Listener = ( Result < ReturnType , Error > ) -> Void
19
19
20
20
func notify( _ result: Result < ReturnType , Error > ) {
@@ -25,19 +25,19 @@ struct MQTTListeners<ReturnType> {
25
25
}
26
26
}
27
27
28
- mutating func addListener( named name: String , listener: @escaping Listener ) {
28
+ func addListener( named name: String , listener: @escaping Listener ) {
29
29
self . lock. withLock {
30
30
listeners [ name] = listener
31
31
}
32
32
}
33
33
34
- mutating func removeListener( named name: String ) {
34
+ func removeListener( named name: String ) {
35
35
self . lock. withLock {
36
36
listeners [ name] = nil
37
37
}
38
38
}
39
39
40
- mutating func removeAll( ) {
40
+ func removeAll( ) {
41
41
self . listeners = [ : ]
42
42
}
43
43
You can’t perform that action at this time.
0 commit comments