I was thinking of the if_ok! macro, which is intended for use with the Result type:
``` macro_rules! if_ok( ($inp: expr) => ( match $inp { Ok(v) => { v } Err(e) => { return Err(e); } } ) ) ``` It is used like: ``` let foo = if_ok!(something_that_yields_a_result()); ``` Niko On Thu, May 23, 2013 at 09:48:28AM -0700, Ziad Hatahet wrote: > Thanks all for the replies. > > Niko, could you point out where in the code you defined the macro you > mention? > > Thanks > > -- > Ziad _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev