Skip to content

Commit

Permalink
Delete unused code in DelaySubscription.swift
Browse files Browse the repository at this point in the history
The parent didn't used in DelaySubscriptionSink
  • Loading branch information
mykoma authored and kzaher committed Feb 3, 2019
1 parent 0d07eec commit d7e195e
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions RxSwift/Observables/DelaySubscription.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ extension ObservableType {
final private class DelaySubscriptionSink<O: ObserverType>
: Sink<O>, ObserverType {
typealias E = O.E
typealias Parent = DelaySubscription<E>

private let _parent: Parent

init(parent: Parent, observer: O, cancel: Cancelable) {
self._parent = parent
super.init(observer: observer, cancel: cancel)
}

func on(_ event: Event<E>) {
self.forwardOn(event)
Expand All @@ -56,7 +48,7 @@ final private class DelaySubscription<Element>: Producer<Element> {
}

override func run<O : ObserverType>(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element {
let sink = DelaySubscriptionSink(parent: self, observer: observer, cancel: cancel)
let sink = DelaySubscriptionSink(observer: observer, cancel: cancel)
let subscription = self._scheduler.scheduleRelative((), dueTime: self._dueTime) { _ in
return self._source.subscribe(sink)
}
Expand Down

0 comments on commit d7e195e

Please sign in to comment.