[][src]Function rustils::parse::ulong::bool_to_u64

pub fn bool_to_u64(a: bool) -> u64

Parse bool to u64

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

Arguments

Examples

use rustils::parse::ulong::bool_to_u64;

assert_eq!(bool_to_u64(true), 1_u64);
assert_eq!(bool_to_u64(false), 0_u64);