Skip to content

Instantly share code, notes, and snippets.

@pshc
Created December 2, 2015 05:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pshc/7d4dd40fbc9558a43b90 to your computer and use it in GitHub Desktop.
Save pshc/7d4dd40fbc9558a43b90 to your computer and use it in GitHub Desktop.
fn unwrappin_life() {
guard! {
let decl = match blk.stmts[0].node { StmtDecl(ref decl, _) };
let item = match decl.node { DeclItem(ref item) };
let expr = match item.node { ItemStatic(_, _, ref expr) };
let ptr = match expr.node { ExprAddrOf(_, ref ptr) };
let array = match ptr.node { ExprVec(ref array) };
else return nope!("lack of array of strings")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment