diff options
author | Nadrieril | 2019-04-14 22:42:35 +0200 |
---|---|---|
committer | Nadrieril | 2019-04-14 22:42:35 +0200 |
commit | 0110cdad6f61503d27535c4ae375adccd5b81012 (patch) | |
tree | 71dcfe80cc371ce3993452e2503433c518981ca6 | |
parent | beadb7a9641dda256e505b6ad13fed5de701b040 (diff) |
Remove match_iter from iter_patterns
Diffstat (limited to '')
-rw-r--r-- | iter_patterns/src/lib.rs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/iter_patterns/src/lib.rs b/iter_patterns/src/lib.rs index 657b538..0672499 100644 --- a/iter_patterns/src/lib.rs +++ b/iter_patterns/src/lib.rs @@ -227,38 +227,6 @@ macro_rules! match_vec { }; } -/* Pattern-match on an iterator using the syntax of slice_patterns. - * Wraps the match body in `Some` if there was a match; returns - * `None` otherwise. - * - * Example: - * ``` - * let vec = vec![Some(1), Some(2), None]; - * - * match_iter!(vec.into_iter(); - * [Some(x), y.., z] => { - * // x: usize - * // y: impl Iterator<Option<usize>> - * // z: Option<usize> - * }, - * [x, Some(0)] => { - * // x: Option<usize> - * }, - * [..] => { - * ) - * ``` - * -*/ -#[macro_export] -macro_rules! match_iter { - ($arg:expr; $($args:tt)*) => { - { - let vec: Vec<_> = $arg.collect(); - $crate::match_vec!(vec; $($args)*) - } - }; -} - #[test] fn test() { let test = |v: Vec<Option<isize>>| { |