Skip to content

Instantly share code, notes, and snippets.

@osa1
Last active September 30, 2016 15:56
Show Gist options
  • Select an option

  • Save osa1/aa6f055106b167bafaad417d26b587a7 to your computer and use it in GitHub Desktop.

Select an option

Save osa1/aa6f055106b167bafaad417d26b587a7 to your computer and use it in GitHub Desktop.
mod macros;
#[macro_use]
pub mod reply;
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
}
}
macro_rules! try_opt {
($e:expr) =>(
match $e {
Some(v) => v,
None => return None,
}
)
}
use macros;
fn test() {
try_opt!(None)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment