rust-bitcoin / rust-bitcoin/rust-bitcoin

Are we happy with `units::parse`

Open
#4,176 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.7k
Forks
1k
Avg merge
4d 1h
Merged PRs (30d)
88

Description

We want to release units 1.0, are we 100% happy with the parse module. I ask because:

  • Its only in units because there is no where better (only the ParseIntError is used by units)
  • Its kind of just a bunch of not totally related utils
    • A richer error type
    • Some abstractions for what we think is a good way of handling hex prefixes
    • A code de-duplication macro for string parsing

I'm not sure there is a better solution or that its worth putting too much time into. I just wanted to get consensus that we are happy with it please.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the units::parse module and tracing its users, especially the ParseIntError usage in units. Review the richer error type, hex-prefix abstractions, and string-parsing macro, then compare their ownership and cohesion before proposing a decision. Done means reaching consensus on whether the module is suitable for units 1.0 and what, if anything, should change.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.