From f57da880b65db934dfa8d06163b966e81e1673ce Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Sun, 16 Feb 2020 17:49:34 -0500 Subject: [PATCH] fmt --- src/builtin/color/opacity.rs | 2 +- src/lib.rs | 2 +- tests/color.rs | 10 ++-------- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/builtin/color/opacity.rs b/src/builtin/color/opacity.rs index 3f7aff3..b87520f 100644 --- a/src/builtin/color/opacity.rs +++ b/src/builtin/color/opacity.rs @@ -2,8 +2,8 @@ use std::collections::BTreeMap; use super::Builtin; use crate::common::QuoteKind; -use crate::value::Number; use crate::units::Unit; +use crate::value::Number; use crate::value::Value; pub(crate) fn register(f: &mut BTreeMap) { diff --git a/src/lib.rs b/src/lib.rs index f8d9abb..aa0e34b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -428,7 +428,7 @@ impl<'a> StyleSheetParser<'a> { AtRule::Error(pos, message) => self.error(pos, &message), AtRule::Warn(pos, message) => self.warn(pos, &message), AtRule::Debug(pos, message) => self.debug(pos, &message), - AtRule::Return(_) => todo!("@return in unexpected location!"), + AtRule::Return(_) => return Err("This at-rule is not allowed here.".into()), } } } diff --git a/tests/color.rs b/tests/color.rs index 5cf3bf5..3842027 100644 --- a/tests/color.rs +++ b/tests/color.rs @@ -258,10 +258,7 @@ test!( "a {\n color: invert(white);\n}\n", "a {\n color: black;\n}\n" ); -test!( - invert_number, - "a {\n color: invert(10%);\n}\n" -); +test!(invert_number, "a {\n color: invert(10%);\n}\n"); // test!( // invert_number_casing, // "a {\n color: iNveRt(10%);\n}\n" @@ -404,10 +401,7 @@ test!( "a {\n color: grayscale(red);\n}\n", "a {\n color: gray;\n}\n" ); -test!( - grayscale_number, - "a {\n color: grayscale(15%);\n}\n" -); +test!(grayscale_number, "a {\n color: grayscale(15%);\n}\n"); // test!( // grayscale_number_casing, // "a {\n color: grAyscaLe(15%);\n}\n"