rit

Bit operation for rust. Gives 3 marcos for get, set and reset a bit for any number type.

toml [dependencies] rit = "0.1"

rust fn main() { assert_eq!(rit::get!(0b0000_1111, 0), true); // Test if a bit is set. assert_eq!(rit::set!(0b0000_1111, 0), 0x0f); // Set a bit. assert_eq!(rit::clr!(0b0000_1111, 0), 0x0e); // Reset a bit. }