rustils::parse::ulong
pub fn bool_to_u64(a: bool) -> u64
Parse bool to u64
bool
u64
If a is false then returns 0. If a is true then returns 1.
a
false
true
use rustils::parse::ulong::bool_to_u64; assert_eq!(bool_to_u64(true), 1_u64); assert_eq!(bool_to_u64(false), 0_u64);