rustils::parse::long
pub fn bool_to_i64(a: bool) -> i64
Parse bool to i64
bool
i64
If a is false then returns 0. If a is true then returns 1.
a
false
true
use rustils::parse::long::bool_to_i64; assert_eq!(bool_to_i64(true), 1_i64); assert_eq!(bool_to_i64(false), 0_i64);