Open blakehawkins opened 4 years ago
Note that unlike z-indexes over homogeneous types with different masks, z-indexes over heterogeneous types should be right-padded. E.g.:
assert_eq!(
(FromU8(0b1), FromU16(0b1)).z_index()?,
0b0000000100000000_0000000000000001 // Not 0b0000000000000000_0000000000000011
)
See https://github.com/nvzqz/bit-collection-rs/issues/1
Need to either refactor BitCollection to enable dyn
support, or move to some other bit collection representation.
(u16, f32).z_index()
is not currently possible.