rustils::parse::ushort
pub fn bool_to_u16(a: bool) -> u16
Parse bool to u16
bool
u16
If a is false then returns 0. If a is true then returns 1.
a
false
true
use rustils::parse::ushort::bool_to_u16; assert_eq!(bool_to_u16(true), 1_u16); assert_eq!(bool_to_u16(false), 0_u16);