Skip to content

Instantly share code, notes, and snippets.

@jasdev
Last active May 1, 2020 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasdev/ed05f69fd1426022736b3b7ff091855a to your computer and use it in GitHub Desktop.
Save jasdev/ed05f69fd1426022736b3b7ff091855a to your computer and use it in GitHub Desktop.
A trimmed `dump` of a `Subject` instance.
import Combine
enum SomeError: Error {
case anError
}
let subject = PassthroughSubject<Int, SomeError>()
subject.send(completion: .failure(.anError))
dump(subject)
/// (1) Trimmed output, take note of the `active` property:
/// ```none
/// ▿ Combine.PassthroughSubject<Swift.Int, __lldb_expr_148.SomeError> #0
/// - active: false
/// …
/// ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment