0.9.0
This release adds new checked
setters, which check for integer overflows and return an error instead of panicing (like the normal setters) #49.
#[bitfield(u32)]
struct MyBitfield {
#[bits(3)]
number: i32,
#[bits(29)]
__: (),
}
assert!(MyBitfield::new().with_number_checked(4).is_err());
Also, the automatic generation of the new
function can now also be disable, similar to debug
or default
#50.
Lastly, the crate now specifies a minimal supported rust version #44.
Thanks to @EngJay, @ultimaweapon, and @DavidAntliff for reporting these issues.