rustils::parse::ubyte
pub fn bool_to_u8(a: bool) -> u8
Parse bool to u8
bool
u8
If a is false then returns 0. If a is true then returns 1.
a
false
true
use rustils::parse::ubyte::bool_to_u8; assert_eq!(bool_to_u8(true), 1_u8); assert_eq!(bool_to_u8(false), 0_u8);