Skip to content

Catch will never get executed. #5

@comiclandapp

Description

@comiclandapp

Awesome repo. Thank you, sir.

I have a question rather than an issue.

In Publisher+Utils.swift, I get a warning that the .catch will never get executed (Xcode Version 12.5 beta 3).

Any suggestions to fix that warning?

Thanks and regards.

extension Publisher {
...
    static func just(_ output: Output) -> AnyPublisher<Output, Failure> {
        return Just(output)
            .catch { _ in AnyPublisher<Output, Failure>.empty() }
            .eraseToAnyPublisher()
    }
...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions