rust-ux / uX

Non standard integer types like `u7`, `u9`, `u10`, `u63`, `i7`, `i9`
Apache License 2.0
121 stars 37 forks source link

Should this library also have 1 bit sized types i1 and u1? #12

Closed lygstate closed 6 years ago

lygstate commented 6 years ago

i1 (0, -1) u1 (0, 1)

kjetilkjeka commented 6 years ago

Excellent question, thanks for opening the issue!

They were left out since one of the things i was using this crate for early on was to implement some of the uavcan types. I guess the logic there is that bool can be used instead.

But there's both a conceptual difference between bool, i1 and u1 and would also go towards providing a more complete/consistent interface. I therefore think it makes completely sense to include i1 and u1.

Would you be willing to create a PR implementing this @lygstate ?

lygstate commented 6 years ago

@kjetilkjeka Sorry, I am an newbie for rust, not capable do that yet:)