rust-bitcoin-unsafe-fast/bitcoin/src/taproot
Martin Habovstiak a013700527 Replace uses of `chunks_exact` with `as_chunks`
In the past we've been using `chunks_exact` because const generics were
unstable but then, when they were stabilized we didn't use `as_chunks`
(or `array_chunks`) since they were unstable. But the instability was
only because Rust devs don't know how to handle `0` being passed in. The
function is perfectly implementable on stable. (With a tiny,
easy-to-understand `unsafe` block.) `core` doesn't want to make a
decision for all other crates yet but we can make it for our own crates
because we know that we simply never pass zero. (And even if we did, we
could just change the decision.)

It also turns out there's a hack to simulate `const {}` block in our
MSRV, so we can make compilation fail early.

This commit adds an extension trait to internals to provide the methods,
so we no longer have to use `chunks_exact`. It also cleans up the code
quite nicely.
2025-03-06 19:02:08 +01:00
..
merkle_branch.rs Replace uses of `chunks_exact` with `as_chunks` 2025-03-06 19:02:08 +01:00
mod.rs update secp256k1 to 0.30.0 2025-03-02 23:31:48 +08:00
serialized_signature.rs Update serialized_signature.rs 2025-02-28 12:34:45 +01:00