rust-bitcoin-unsafe-fast/bitcoin
Tobin C. Harding b873a3cd44
Do infallible int from hex conversions
We have three integer wrapping types that can be created from hex
strings where the conversion from an integer is infallible:

- `absolute::LockTime`
- `Sequence`
- `CompactTarget`

We would like to improve our handling of the two prefix characters (eg
0x) by making it explicit.

- Modify the inherent `from_hex` method on each type to error if the
input string does not contain a prefix.

- Add an additional inherent method on each type `from_unprefixed_hex`
that errors if the input string does contain a prefix.

This patch does not touch the wrapper types that cannot be infallibly
constructed from an integer (i.e. absolute `Height` and `Time`).
2024-02-27 10:40:52 +11:00
..
contrib Run sighash example in CI 2024-02-05 17:50:52 +11:00
embedded Add a new base58 crate 2024-02-23 12:54:24 +11:00
examples Fix new nightly warnings/errors 2024-02-21 14:13:49 +11:00
src Do infallible int from hex conversions 2024-02-27 10:40:52 +11:00
tests Fix new nightly warnings/errors 2024-02-21 14:13:49 +11:00
CHANGELOG.md Remove no-std feature 2023-12-06 09:54:33 +11:00
Cargo.toml Add a new base58 crate 2024-02-23 12:54:24 +11:00
build.rs Bump MSRV to Rust version 1.56.1 2023-11-23 06:20:02 +11:00