From 3ae4555d81c02bdfc1f95b6ede59876dc0f02a86 Mon Sep 17 00:00:00 2001 From: Ryan Chandler Date: Wed, 7 Dec 2022 01:02:04 +0000 Subject: [PATCH] chore: fmt --- src/parser/mod.rs | 12 ++++-------- tests/third_party_tests.rs | 6 +----- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 5b48e27..9009714 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -479,9 +479,9 @@ impl Parser { self.left_brace(state)?; TokenKind::RightBrace }; - + let body = self.block(state, &end_token)?; - + if end_token == TokenKind::RightBrace { self.right_brace(state)?; } else { @@ -791,9 +791,7 @@ impl Parser { self.right_brace(state)?; then } else { - vec![ - self.statement(state)? - ] + vec![self.statement(state)?] }; let mut else_ifs: Vec = Vec::new(); @@ -838,9 +836,7 @@ impl Parser { self.right_brace(state)?; } else { - r#else = vec![ - self.statement(state)? - ]; + r#else = vec![self.statement(state)?]; } Statement::If { diff --git a/tests/third_party_tests.rs b/tests/third_party_tests.rs index 2ac57db..3784fca 100644 --- a/tests/third_party_tests.rs +++ b/tests/third_party_tests.rs @@ -62,11 +62,7 @@ fn third_party_4_nikic_php_parser() { "nikic/PHP-Parser", "https://github.com/nikic/PHP-Parser", "4.x", - &[ - "lib/PhpParser", - "grammar", - "test" - ], + &["lib/PhpParser", "grammar", "test"], &[], ); }