Function xor_distance_exercise::bitops::is_flag_set
source · Expand description
Returns whether the given flag is set.
It doesn’t check if the provided flag is really flag.
Examples
extern crate xor_distance_exercise;
use xor_distance_exercise::bitops::is_flag_set;
let x = 0b1101;
let flag = 0b0001;
assert!(is_flag_set(x, flag));