1 unstable release

0.1.0 Aug 28, 2022

#20 in #positive

MIT/Apache

4KB

Attempted

Crates.io Documentation

Examples

fn positive(x: i32) -> Option<i32> {
    if x > 0 {
        Some(x)
    } else {
        None
    }
}

#[attempt]
fn test() {
    // try something
    let x = positive(13)?;
    
    // do something with x
    println!("{} is positive", x);
}

Dependencies

~1.5MB
~34K SLoC