diff --git a/src/atrule.rs b/src/atrule.rs index 04a38de..d75e6a9 100644 --- a/src/atrule.rs +++ b/src/atrule.rs @@ -89,14 +89,15 @@ impl AtRule { t.push(toks.next().unwrap()); } AtRule::Return(t) - }, + } AtRuleKind::Use => todo!("@use not yet implemented"), AtRuleKind::Annotation => todo!("@annotation not yet implemented"), AtRuleKind::AtRoot => todo!("@at-root not yet implemented"), AtRuleKind::Charset => { - toks.take_while(|t| t.kind != TokenKind::Symbol(Symbol::SemiColon)).for_each(drop); + toks.take_while(|t| t.kind != TokenKind::Symbol(Symbol::SemiColon)) + .for_each(drop); AtRule::Charset - }, + } AtRuleKind::Each => todo!("@each not yet implemented"), AtRuleKind::Extend => todo!("@extend not yet implemented"), AtRuleKind::If => todo!("@if not yet implemented"), diff --git a/src/css.rs b/src/css.rs index 3b860ac..c50bf19 100644 --- a/src/css.rs +++ b/src/css.rs @@ -1,11 +1,11 @@ //! # Convert from SCSS AST to CSS use crate::atrule::AtRule; use crate::error::SassResult; -use crate::{RuleSet, Selector, Stmt, Style, StyleSheet}; use crate::lexer::IS_UTF8; -use std::sync::atomic::Ordering; +use crate::{RuleSet, Selector, Stmt, Style, StyleSheet}; use std::fmt; use std::io::Write; +use std::sync::atomic::Ordering; #[derive(Debug, Clone)] enum Toplevel { diff --git a/src/mixin.rs b/src/mixin.rs index d61d663..23b6c43 100644 --- a/src/mixin.rs +++ b/src/mixin.rs @@ -98,11 +98,13 @@ impl Mixin { Expr::Style(s) => stmts.push(Stmt::Style(*s)), Expr::Styles(s) => stmts.extend(s.into_iter().map(Stmt::Style)), Expr::Include(s) => stmts.extend(s), - Expr::FunctionDecl(..) => return Err("Mixins may not contain function declarations.".into()), - Expr::MixinDecl(..) => return Err("Mixins may not contain mixin declarations.".into()), - Expr::Debug(..) | Expr::Warn(..) => { - todo!() + Expr::FunctionDecl(..) => { + return Err("Mixins may not contain function declarations.".into()) } + Expr::MixinDecl(..) => { + return Err("Mixins may not contain mixin declarations.".into()) + } + Expr::Debug(..) | Expr::Warn(..) => todo!(), Expr::Selector(selector) => { let rules = self.eval(&super_selector.zip(&selector))?; stmts.push(Stmt::RuleSet(RuleSet { diff --git a/src/value/mod.rs b/src/value/mod.rs index cf0bcbe..d9c5ded 100644 --- a/src/value/mod.rs +++ b/src/value/mod.rs @@ -52,8 +52,7 @@ impl Display for Value { write!(f, "\"{}\"", val) } else if !has_single_quotes && has_double_quotes { write!(f, "'{}'", val) - } - else if !has_single_quotes && !has_double_quotes { + } else if !has_single_quotes && !has_double_quotes { write!(f, "\"{}\"", val) } else { let quote_char = match kind {