dzamlo / rust-bitfield

This crate provides macros to generate bitfield-like struct.
Apache License 2.0
157 stars 19 forks source link

Add `Into` support for booleans #7

Open ithinuel opened 6 years ago

ithinuel commented 6 years ago

So that we can use enums even if the field is only 1 bit wide.

It can currently be worked around by using into Type, field1, _: 2, 2; But it looks wrong and it still requires Type to implement From/Into.