From 8e0a59dc5d07eb51c627c7e3616753df36467da6 Mon Sep 17 00:00:00 2001 From: gluax <16431709+gluax@users.noreply.github.com> Date: Mon, 14 Mar 2022 08:12:29 -0700 Subject: [PATCH] fmt --- compiler/parser/src/parser/statement.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/compiler/parser/src/parser/statement.rs b/compiler/parser/src/parser/statement.rs index 251d00136c..3155a0b633 100644 --- a/compiler/parser/src/parser/statement.rs +++ b/compiler/parser/src/parser/statement.rs @@ -296,14 +296,15 @@ impl ParserContext<'_> { // Parse variable names. let variable_names = if self.peek_is_left_par() { - let vars = self.parse_paren_comma_list(|p| p.parse_variable_name(&declare).map(Some)) - .map(|(vars, ..)| vars)?; - - if vars.len() == 1 { - self.emit_err(ParserError::invalid_parens_around_single_variable(vars[0].span())); - } + let vars = self + .parse_paren_comma_list(|p| p.parse_variable_name(&declare).map(Some)) + .map(|(vars, ..)| vars)?; - vars + if vars.len() == 1 { + self.emit_err(ParserError::invalid_parens_around_single_variable(vars[0].span())); + } + + vars } else { vec![self.parse_variable_name(&declare)?] };