Skip to content

Instantly share code, notes, and snippets.

@laevandus
Created November 4, 2020 12:05
Show Gist options
  • Save laevandus/815c612c703c432e31f10f0ea2c47b06 to your computer and use it in GitHub Desktop.
Save laevandus/815c612c703c432e31f10f0ea2c47b06 to your computer and use it in GitHub Desktop.
extension Publisher where Self.Failure == Never {
public func notifyObjectWillChange(_ objectWillChange: ObservableObjectPublisher) -> AnyCancellable {
return self.sink { _ in
objectWillChange.send()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment