Macro tear::ret[][src]

macro_rules! ret {
    ( $($v:tt)* ) => { ... };
}

Shorthand for returning a ValRet::Ret

Example

use tear::{ValRet, ret};

fn f() -> ValRet<(), i8> {
    if true {
        ret!(72);
    } else {
        ValRet::Val(())
    }
}

assert_eq![ f(), ValRet::Ret(72) ];