11 lines
155 B
Swift
11 lines
155 B
Swift
|
import Combine
|
||
|
|
||
|
typealias CancelBag = Set<AnyCancellable>
|
||
|
|
||
|
extension CancelBag {
|
||
|
mutating func cancelAll() {
|
||
|
forEach { $0.cancel() }
|
||
|
removeAll()
|
||
|
}
|
||
|
}
|