Skip to content

Instantly share code, notes, and snippets.

@lizixroy
Created September 4, 2016 19:53
Show Gist options
  • Select an option

  • Save lizixroy/a8cf963a668da0c3db56d415d5d55e15 to your computer and use it in GitHub Desktop.

Select an option

Save lizixroy/a8cf963a668da0c3db56d415d5d55e15 to your computer and use it in GitHub Desktop.
RxSwift-article-7.swift
@warn_unused_result(message="http://git.io/rxs.ud")
func subscribeSafe<O: ObserverType where O.E == E>(observer: O) -> Disposable {
return self.asObservable().subscribe(observer)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment