multiformats / multiformats/rust-multihash
Redesign multihash::Error
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 166
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Description
Do we have other
constfunctions 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::ErrorinKind? 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 anio::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 https://github.com/multiformats/rust-multihash/pull/331#issuecomment-1642486508
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the discussion from PR #331 and inspect the existing multihash::Error, Kind, and const-function APIs. Trace where io::Error and io::Result are used, then determine the intended breaking-change scope and how completion would be verified; the issue names no files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100