Closed bifurcation closed 8 months ago
Thanks! Definitely an improvement
BTW, I figured out how to make it big-endian. Requires some trait and associated type magic, but works fine. LMK if this seems worthwhile and I can make a PR.
I'm fine with it being little endian, especially as an internal macro
If only there were a way to expand an integer into its bits in the macro syntax!
This PR adds a macro that simplifies the definition of new integer values, and uses it for the integers we need to define here. It allows a new
UInt
type to be defined simply by listing its bits. Unfortunately, because Rust macros only permit recursive matching in one direction, we have to use the little-endian bit order, even though big-endian would be easier to read.Not a huge change, but it at least allows us to remove the
#[rustfmt::skip]
line.