[][src]Function rustils::parse::uint::bool_to_u32

pub fn bool_to_u32(a: bool) -> u32

Parse bool to u32

If a is false then returns 0.
If a is true then returns 1.

Arguments

Examples

use rustils::parse::uint::bool_to_u32;

assert_eq!(bool_to_u32(true), 1_u32);
assert_eq!(bool_to_u32(false), 0_u32);