From afba0dd9931bbcb0c6fa63e0eea4cc28eda7cf7d Mon Sep 17 00:00:00 2001 From: connorskees Date: Sat, 7 Jan 2023 17:32:51 +0000 Subject: [PATCH] fix CI, rustfmt --- .github/workflows/tests.yml | 2 +- CHANGELOG.md | 1 + grass_internal/src/builtin/mod.rs | 2 +- grass_internal/src/parse/css.rs | 26 ++++++++++++++------------ grass_internal/src/parse/sass.rs | 2 +- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fd8d561..96c0176 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable + toolchain: nightly override: true - name: version info diff --git a/CHANGELOG.md b/CHANGELOG.md index 51d229a..ccb8a35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ # 0.12.1 (unreleased) - add `grass::include!` macro to make it easier to include CSS at compile time +- various optimizations improving the bootstrap benchmark by ~30% and the bulma benchmark by ~15% - improve error message for complex units in calculations - more accurate formatting of named arguments in arglists when passed to `inspect(..)` - more accurate formatting of nested lists with different separators when passed to `inspect(..)` diff --git a/grass_internal/src/builtin/mod.rs b/grass_internal/src/builtin/mod.rs index 257bdd8..0e1950c 100644 --- a/grass_internal/src/builtin/mod.rs +++ b/grass_internal/src/builtin/mod.rs @@ -27,8 +27,8 @@ mod builtin_imports { }; pub(crate) use std::{ - sync::Arc, cmp::Ordering, collections::{BTreeMap, BTreeSet}, + sync::Arc, }; } diff --git a/grass_internal/src/parse/css.rs b/grass_internal/src/parse/css.rs index 22a2248..dc5fae5 100644 --- a/grass_internal/src/parse/css.rs +++ b/grass_internal/src/parse/css.rs @@ -203,17 +203,19 @@ impl<'a> CssParser<'a> { return Err(("This function isn't allowed in plain CSS.", span).into()); } - Ok(AstExpr::InterpolatedFunction(Arc::new(InterpolatedFunction { - name: identifier, - arguments: ArgumentInvocation { - positional: arguments, - named: BTreeMap::new(), - rest: None, - keyword_rest: None, - span: self.toks.span_from(before_args), - }, - span, - })) - .span(span)) + Ok( + AstExpr::InterpolatedFunction(Arc::new(InterpolatedFunction { + name: identifier, + arguments: ArgumentInvocation { + positional: arguments, + named: BTreeMap::new(), + rest: None, + keyword_rest: None, + span: self.toks.span_from(before_args), + }, + span, + })) + .span(span), + ) } } diff --git a/grass_internal/src/parse/sass.rs b/grass_internal/src/parse/sass.rs index 5307a4f..2b1f1d3 100644 --- a/grass_internal/src/parse/sass.rs +++ b/grass_internal/src/parse/sass.rs @@ -2,7 +2,7 @@ use std::path::Path; use codemap::{CodeMap, Span}; -use crate::{ast::*, error::SassResult, lexer::Lexer, Token, ContextFlags, Options}; +use crate::{ast::*, error::SassResult, lexer::Lexer, ContextFlags, Options, Token}; use super::{BaseParser, StylesheetParser};