Last active
September 25, 2016 07:13
-
-
Save sinkuu/eba0120fe4c6593eb69ec86231822682 to your computer and use it in GitHub Desktop.
This file contains hidden or 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! while_iter_ok { | |
| ($it:expr, |$x:pat| $f:expr) => { | |
| for x in $it { | |
| let $x = try!(x); | |
| $f; | |
| } | |
| }; | |
| ($it:expr, |_ : $t:ty| $f:expr) => { | |
| for x in $it { | |
| let _: $t = try!(x); | |
| $f; | |
| } | |
| }; | |
| ($it:expr, |$x:ident : $t:ty| $f:expr) => { | |
| for x in $it { | |
| let $x: $t = try!(x); | |
| $f; | |
| } | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment