diff options
-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>>| { |