Created
September 4, 2016 19:46
-
-
Save lizixroy/3e3c25f2d72abc1a0ea4cbf23a2a534e to your computer and use it in GitHub Desktop.
RxSwift-article-3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@warn_unused_result(message="http://git.io/rxs.ud") | |
public func subscribeNext(onNext: (E) -> Void) -> Disposable { | |
let observer = AnonymousObserver<E> { e in | |
if case .Next(let value) = e { | |
onNext(value) | |
} | |
} | |
return self.subscribeSafe(observer) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment