Created
May 9, 2016 14:30
-
-
Save ayosec/663bec676410e687378870d0480221d2 to your computer and use it in GitHub Desktop.
Replace try! with panic!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro_rules! try { | |
( $expr : expr) => { | |
match $expr { | |
Ok(v) => v, | |
Err(e) => panic!("Err {}: {:?}", stringify!($expr), e), | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment