Function lib::util::other::one

source ·
pub fn one(b: bool) -> usize
Expand description

b ? 1 : 0.

§Examples

use lib::util::other::one;
let mut count = 0;
count += one("some" < "condition");