Skip to content

Redesign multihash::Error #332

Description

@aatifsyed

Do we have other const functions that might be affected by the same problem? I wonder what a long-term solution could be here.

In the issue, you said that the problem is the io::Error in Kind? I tried previously to remove that one because it only appears in certain functions. Perhaps that is worth exploring because most functions don't actually return an io::Error.

If you'd like my opinion, you should impl From<YourErrorType> for std::io::Error, and have io functions return an io::Result, which may be InvalidData with a source = Some(YourErrorType), where YourErrorType is a slimmer Error

(This would be a breaking change.)
((I think that's fine, you're pre 1.0.0, and the API should be allowed to evolve past current limitations))

Originally posted by @aatifsyed in #331 (comment)

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions