2 stable releases

2.0.0 Apr 23, 2022
1.0.0 Apr 21, 2022

#2689 in Rust patterns

Unlicense OR CC0-1…

6KB

yeet!

Replace return Err(x) and return None with:

fn foo() -> Option<u32> {
    yeet!();
}

fn bar() -> Result<u32, u32> {
    yeet!(42);
}

fn baz(x: u32) -> Result<u32, u32> {
    if x % 2 == 1 {
        yeet!(x);
    }
    Ok(x)
}

That's pretty much it.


lib.rs:

Poor man's yeet keyword on stable.

No runtime deps