Skip to content

Missing std::error::Error impl on S7Error enum #5

Description

@uwe-nanninga

The S7Error enum does not implement std::error::Error, making it incompatible with APIs that accept Box<dyn std::error::Error> or error handling crates such as anyhow.

Example

fn foo() -> Result<(), Box<dyn std::error::Error>> {
    Err(S7Error::ConnectionClosed)?;
    Ok(())
}

Actual behaviour

error[E0277]: `?` couldn't convert the error: `S7Error: std::error::Error` is not satisfied

Expected behaviour

Code compiles successfully.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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