Skip to content

0.9.0

Compare
Choose a tag to compare
@wrenger wrenger released this 23 Sep 23:30
· 17 commits to main since this release

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.