mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-03-21 00:49:30 +01:00
Add examples project
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import Combine
|
||||
|
||||
final class AnySubscription: Subscription {
|
||||
private let cancellable: Cancellable
|
||||
|
||||
init(_ cancel: @escaping () -> Void) {
|
||||
cancellable = AnyCancellable(cancel)
|
||||
}
|
||||
|
||||
func request(_ demand: Subscribers.Demand) {}
|
||||
|
||||
func cancel() {
|
||||
cancellable.cancel()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user