Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Error types do not implement Error::source #528

@Aeledfyr

Description

@Aeledfyr

Both the ErrorKind type in bincode 1.3.3 and the EncodeError/DecodeError types in bincode 2.0.0-rc.1 do not implement the source method in std::error::Error, which allows for automatic introspection of error causes.

Implementing it in 1.3.3 should be trivial, as it should be possible to reusing the implementation of the deprecated cause method (which 1.3.3 implements).

I've noticed that bincode 1.0 appears to have a MSRV below the version in which source was added. Does this prevent the library from implementing it in any form, or can conditional compilation be used to implement it if the compiler version supports it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions