Hi! This PR seems OK to me, but likely it will just be the starting point. Obviously feedback is appreciated, and here are some thoughts I had:
Existing code doesn't seem to use new often, I could reduce the usages that I introduce?
Unsure exactly how manifest::owned::pfm and the elements in manifest::pfm really related to each other, should I make changes to manifest::pfm as well?
I specifically wrote the code to be forward/backward compatible with new flags, wire_enum didn't seem to be a perfect fit here especially because these flags don't have the whole byte, just a bit or two at the moment.
The zeroth_bit_zero and the << 6 >> 6 shifting don't seem great.. but they're relatively simple so I thought why try something more complicated
I could pull these things out to a flags module if you'd like, the code is a bit messy all together
Yes my tests test all u8 values, but its not that many. I heard someone once say "why not test them all?" when referring to testing variants on numbers less than like 32 bits, so I just went along with that logic.
fixes #60
Hi! This PR seems OK to me, but likely it will just be the starting point. Obviously feedback is appreciated, and here are some thoughts I had:
new
often, I could reduce the usages that I introduce?manifest::owned::pfm
and the elements inmanifest::pfm
really related to each other, should I make changes tomanifest::pfm
as well?wire_enum
didn't seem to be a perfect fit here especially because these flags don't have the whole byte, just a bit or two at the moment.zeroth_bit_zero
and the<< 6 >> 6
shifting don't seem great.. but they're relatively simple so I thought why try something more complicatedflags
module if you'd like, the code is a bit messy all togetheru8
values, but its not that many. I heard someone once say "why not test them all?" when referring to testing variants on numbers less than like 32 bits, so I just went along with that logic.Thx!