summaryrefslogtreecommitdiff
path: root/src/parse/parser.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-07-16 12:03:00 +0200
committerLaurenz <laurmaedje@gmail.com>2021-07-16 12:07:15 +0200
commit5edbd3a5b58c11939ea9823c6a847ba447254cb6 (patch)
tree0b0ad36451f5a3b85bd0406fdb656cd0d2a11890 /src/parse/parser.rs
parent81f2f8f4c335dc399174d7c44a226bbc2cf98c8f (diff)
Use array's IntoIterator impl and nested or patterns
*yay*
Diffstat (limited to 'src/parse/parser.rs')
-rw-r--r--src/parse/parser.rs5
1 files changed, 1 insertions, 4 deletions
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.