diff --git a/src/builtin/color/hsl.rs b/src/builtin/color/hsl.rs index 3727b4c..b8014e0 100644 --- a/src/builtin/color/hsl.rs +++ b/src/builtin/color/hsl.rs @@ -32,19 +32,19 @@ pub(crate) fn register(f: &mut HashMap) { let lightness = match channels.pop() { Some(Value::Dimension(n, _)) => n / Number::from(100), - Some(v) => return Err(format!("$lightness: {} is not a number", v).into()), + Some(v) => return Err(format!("$lightness: {} is not a number.", v).into()), None => return Err("Missing element $lightness.".into()), }; let saturation = match channels.pop() { Some(Value::Dimension(n, _)) => n / Number::from(100), - Some(v) => return Err(format!("$saturation: {} is not a number", v).into()), + Some(v) => return Err(format!("$saturation: {} is not a number.", v).into()), None => return Err("Missing element $saturation.".into()), }; let hue = match channels.pop() { Some(Value::Dimension(n, _)) => n, - Some(v) => return Err(format!("$hue: {} is not a number", v).into()), + Some(v) => return Err(format!("$hue: {} is not a number.", v).into()), None => return Err("Missing element $hue.".into()), }; @@ -110,19 +110,19 @@ pub(crate) fn register(f: &mut HashMap) { let lightness = match channels.pop() { Some(Value::Dimension(n, _)) => n / Number::from(100), - Some(v) => return Err(format!("$lightness: {} is not a number", v).into()), + Some(v) => return Err(format!("$lightness: {} is not a number.", v).into()), None => return Err("Missing element $lightness.".into()), }; let saturation = match channels.pop() { Some(Value::Dimension(n, _)) => n / Number::from(100), - Some(v) => return Err(format!("$saturation: {} is not a number", v).into()), + Some(v) => return Err(format!("$saturation: {} is not a number.", v).into()), None => return Err("Missing element $saturation.".into()), }; let hue = match channels.pop() { Some(Value::Dimension(n, _)) => n, - Some(v) => return Err(format!("$hue: {} is not a number", v).into()), + Some(v) => return Err(format!("$hue: {} is not a number.", v).into()), None => return Err("Missing element $hue.".into()), }; diff --git a/src/builtin/color/rgb.rs b/src/builtin/color/rgb.rs index 214fde7..0daf0ff 100644 --- a/src/builtin/color/rgb.rs +++ b/src/builtin/color/rgb.rs @@ -34,7 +34,7 @@ pub(crate) fn register(f: &mut HashMap) { Some(Value::Dimension(n, Unit::Percent)) => { (n / Number::from(100)) * Number::from(255) } - Some(v) => return Err(format!("$blue: {} is not a number", v).into()), + Some(v) => return Err(format!("$blue: {} is not a number.", v).into()), None => return Err("Missing element $blue.".into()), }; @@ -43,7 +43,7 @@ pub(crate) fn register(f: &mut HashMap) { Some(Value::Dimension(n, Unit::Percent)) => { (n / Number::from(100)) * Number::from(255) } - Some(v) => return Err(format!("$green: {} is not a number", v).into()), + Some(v) => return Err(format!("$green: {} is not a number.", v).into()), None => return Err("Missing element $green.".into()), }; @@ -52,7 +52,7 @@ pub(crate) fn register(f: &mut HashMap) { Some(Value::Dimension(n, Unit::Percent)) => { (n / Number::from(100)) * Number::from(255) } - Some(v) => return Err(format!("$red: {} is not a number", v).into()), + Some(v) => return Err(format!("$red: {} is not a number.", v).into()), None => return Err("Missing element $red.".into()), }; @@ -156,7 +156,7 @@ pub(crate) fn register(f: &mut HashMap) { Some(Value::Dimension(n, Unit::Percent)) => { (n / Number::from(100)) * Number::from(255) } - Some(v) => return Err(format!("$blue: {} is not a number", v).into()), + Some(v) => return Err(format!("$blue: {} is not a number.", v).into()), None => return Err("Missing element $blue.".into()), }; @@ -165,7 +165,7 @@ pub(crate) fn register(f: &mut HashMap) { Some(Value::Dimension(n, Unit::Percent)) => { (n / Number::from(100)) * Number::from(255) } - Some(v) => return Err(format!("$green: {} is not a number", v).into()), + Some(v) => return Err(format!("$green: {} is not a number.", v).into()), None => return Err("Missing element $green.".into()), }; @@ -174,7 +174,7 @@ pub(crate) fn register(f: &mut HashMap) { Some(Value::Dimension(n, Unit::Percent)) => { (n / Number::from(100)) * Number::from(255) } - Some(v) => return Err(format!("$red: {} is not a number", v).into()), + Some(v) => return Err(format!("$red: {} is not a number.", v).into()), None => return Err("Missing element $red.".into()), };