Replace the generic `parse_int_be` with a macro called twice 2023-03-no-num-traits
authorMatt Corallo <git@bluematt.me>
Wed, 13 Mar 2024 19:18:20 +0000 (19:18 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 13 Mar 2024 19:18:20 +0000 (19:18 +0000)
commit39c1d6b2af4e1edc1616a844ba1c0ed48ae6471e
tree1edbbd98a898ceb192a7fffbe8cfcf1391b0593c
parentc89b96a4b9dec12b9715bf3c30badaf102116e30
Replace the generic `parse_int_be` with a macro called twice

`parse_int_be` is generic across integer types and also input
types, but to do so it relies on the `num-traits` crate. There's
not a lot of reason for this now that std has `from_be_bytes`, so
we drop the generic now and replace it with a macro which is called
twice to create two functions, both only supporting conversion from
`u5` arrays.
lightning-invoice/Cargo.toml
lightning-invoice/src/de.rs
lightning-invoice/src/lib.rs