From e15c88a3c76ee2b3b59178c2cca53cf8d034f99a Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Fri, 17 Jan 2020 22:40:13 -0500 Subject: [PATCH] rustfmt --- src/main.rs | 12 +++++++----- src/mixin.rs | 6 +++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index b114796..ec89578 100644 --- a/src/main.rs +++ b/src/main.rs @@ -432,7 +432,7 @@ fn parse_mixin>( } body.push(tok) } else { - todo!("unexpected EOF") + return Err(Printer::Error(pos, String::from("unexpected EOF"))); } } @@ -518,7 +518,7 @@ pub(crate) fn eat_expr>( devour_whitespace(toks); return Ok(Some(Expr::VariableDecl( name, - eat_variable_value(toks, scope)? + eat_variable_value(toks, scope)?, ))); } else { values.push(Token { @@ -542,9 +542,11 @@ pub(crate) fn eat_expr>( } } TokenKind::AtRule(AtRule::Include) => { - return Ok(Some(Expr::Include( - eat_include(toks, scope, super_selector)?, - ))); + return Ok(Some(Expr::Include(eat_include( + toks, + scope, + super_selector, + )?))); } TokenKind::AtRule(AtRule::Mixin) => { toks.next(); diff --git a/src/mixin.rs b/src/mixin.rs index 50a84ea..5393c9e 100644 --- a/src/mixin.rs +++ b/src/mixin.rs @@ -39,7 +39,11 @@ impl Mixin { self } - pub fn eval(&mut self, super_selector: &Selector, scope: &mut Scope) -> Result, (Pos, &'static str)> { + pub fn eval( + &mut self, + super_selector: &Selector, + scope: &mut Scope, + ) -> Result, (Pos, &'static str)> { let mut stmts = Vec::new(); while let Some(expr) = eat_expr(&mut self.body, scope, super_selector)? { match expr {