[][src]Function tao_of_rust::ch02::control_flow::match_bool

pub fn match_bool()

Basic usage:

fn match_bool() {
    let boolean = true;
    let binary = match boolean {
        false => 0,
        true => 1,
    };
    assert_eq!(binary, 1);
}
match_bool();Run