From 5edbd3a5b58c11939ea9823c6a847ba447254cb6 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 16 Jul 2021 12:03:00 +0200 Subject: Use array's IntoIterator impl and nested or patterns *yay* --- src/parse/parser.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/parse/parser.rs') diff --git a/src/parse/parser.rs b/src/parse/parser.rs index d4192b50..5fba961a 100644 --- a/src/parse/parser.rs +++ b/src/parse/parser.rs @@ -381,10 +381,7 @@ impl<'s> Parser<'s> { /// Whether the active group ends at a newline. fn stop_at_newline(&self) -> bool { let active = self.groups.last().map(|group| group.kind); - matches!( - active, - Some(Group::Stmt) | Some(Group::Expr) | Some(Group::Imports) - ) + matches!(active, Some(Group::Stmt | Group::Expr | Group::Imports)) } /// Whether we are inside the given group. -- cgit v1.2.3