Skip to content

Instantly share code, notes, and snippets.

@mecid
Created June 26, 2019 19:17
Show Gist options
  • Save mecid/c31dd4959cf34d71036edfe16f8b62ac to your computer and use it in GitHub Desktop.
Save mecid/c31dd4959cf34d71036edfe16f8b62ac to your computer and use it in GitHub Desktop.
private func fetchRepos(matching query: String) {
githubService
.search(matching: query)
.replaceError(with: [])
.subscribe(on: DispatchQueue.global())
.receive(on: OperationQueue.main)
.assign(to: \.repos, on: self)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment