You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a few problems right now that look like the solution is more tiny crates. This issue is to discuss if we want to do that. An alternative is to duplicate code and make things private.
Hex prefix string parsing functions and error types: Uses ParseIntError
These three things are all slightly unrelated and also exist for slightly different reasons. All three are used in multiple crates and are needed in order to stabalize.
(1) exists solely to assist with error handling in a no-std environment
(2) exists to add more context to integer parsing (includes multi-radix support)
(3) exits to enable parsing integers from hex strings (only relates to hex)
Where should they live
Currently
(1) is in internals
(2) and (3) are in units
Possible solutions:
Make everything private and duplicate everywhere
Make 3 tiny crates
Some mix of the two above
Leave as is and muddy up the dependencies (make hex depend on bitcoin-units)
?
Other info
parse_int is already taken and does not do the same thing as (2)
We have a few problems right now that look like the solution is more tiny crates. This issue is to discuss if we want to do that. An alternative is to duplicate code and make things private.
InputStringandwriter_err!: See also units: Removeinternals::InputStringfrom the public API #3708 and Consider moving no-std/alloc error stuff frominternalsto a new stable crate #3322ParseIntError: UsesInputStringParseIntErrorThese three things are all slightly unrelated and also exist for slightly different reasons. All three are used in multiple crates and are needed in order to stabalize.
Where should they live
Currently
internalsunitsPossible solutions:
hexdepend onbitcoin-units)Other info
parse_int is already taken and does not do the same thing as (2)