From 0110cdad6f61503d27535c4ae375adccd5b81012 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 14 Apr 2019 22:42:35 +0200 Subject: Remove match_iter from iter_patterns --- iter_patterns/src/lib.rs | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'iter_patterns') 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> - * // z: Option - * }, - * [x, Some(0)] => { - * // x: Option - * }, - * [..] => { - * ) - * ``` - * -*/ -#[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>| { -- cgit v1.2.3