diff options
author | Nadrieril | 2019-04-06 00:41:31 +0200 |
---|---|---|
committer | Nadrieril | 2019-04-06 00:41:31 +0200 |
commit | 6a675a13fcfafa057c44db84c3b0ca3b344cfdab (patch) | |
tree | 76d0f0fc848887d2945d586b58847575ca31d0da /iter_patterns/src | |
parent | 627287185118482ceb7132f6dedad7111dccf972 (diff) | |
parent | 305a2ee7dcd3b3f61bf6877312e3c34767e8bc0c (diff) |
Merge branch 'master' into exprf
Diffstat (limited to '')
-rw-r--r-- | iter_patterns/src/lib.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/iter_patterns/src/lib.rs b/iter_patterns/src/lib.rs index 53ebcd2..abd072e 100644 --- a/iter_patterns/src/lib.rs +++ b/iter_patterns/src/lib.rs @@ -61,23 +61,23 @@ macro_rules! destructure_iter { }; // Single item pattern (@match_forwards, $iter:expr, ($body:expr), $x:pat, $($rest:tt)*) => { - if let Some($x) = $iter.next() { + if let std::option::Option::Some($x) = $iter.next() { $crate::destructure_iter!(@match_forwards, $iter, ($body), $($rest)* ) } else { - None + std::option::Option::None } }; // Single item pattern after a variable length one: declare reversed and take from the end (@match_backwards, $iter:expr, ($body:expr), $x:pat, $($rest:tt)*) => { $crate::destructure_iter!(@match_backwards, $iter, ( - if let Some($x) = $iter.next_back() { + if let std::option::Option::Some($x) = $iter.next_back() { $body } else { - None + std::option::Option::None } ), $($rest)*) }; @@ -85,7 +85,7 @@ macro_rules! destructure_iter { // Check no elements remain (@match_forwards, $iter:expr, ($body:expr) $(,)*) => { if $iter.next().is_some() { - None + std::option::Option::None } else { $body } @@ -101,7 +101,7 @@ macro_rules! destructure_iter { let mut iter = $iter; $crate::destructure_iter!(@match_forwards, iter, - (Some($body)), + (std::option::Option::Some($body)), $($args)*, ) } @@ -217,7 +217,7 @@ macro_rules! match_vec { $crate::destructure_iter!(iter; [$($args)*] => $body) } )* - _ => None, + _ => std::option::Option::None, } } }; |