Function cond

Source
pub const fn cond(cond: bool, if_true: u8, if_false: u8) -> u8
Expand description

Returns if_true if cond is true, and otherwise returns if_false

use const_utils::u8::cond;
assert!(cond(true, 33, 121) == 33);
assert!(cond(false, 33, 121) == 121);