• 1.0.0 f5b70443ac

    1.0.0 Stable

    archiver-bot released this 2017-09-08 20:43:57 -05:00 | 664 commits to main since this release

    • [breaking change] Macro now generates associated constants (#24)

    • [breaking change] Minimum supported version is Rust 1.20, due to usage of associated constants

    • After being broken in 0.9, the #[deprecated] attribute is now supported again (#112)

    • Other improvements to unit tests and documentation (#106 and #115)

    How to update your code to use associated constants

    Assuming the following structure definition:

    bitflags! {
      struct Something: u8 {
         const FOO = 0b01,
         const BAR = 0b10
      }
    }
    

    In 0.9 and older you could do:

    let x = FOO.bits | BAR.bits;
    

    Now you must use:

    let x = Something::FOO.bits | Something::BAR.bits;
    
    Downloads