error messages end in periods
This commit is contained in:
parent
01c1cf3bb3
commit
795c8bdb05
@ -32,19 +32,19 @@ pub(crate) fn register(f: &mut HashMap<String, Builtin>) {
|
||||
|
||||
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<String, Builtin>) {
|
||||
|
||||
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()),
|
||||
};
|
||||
|
||||
|
@ -34,7 +34,7 @@ pub(crate) fn register(f: &mut HashMap<String, Builtin>) {
|
||||
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<String, Builtin>) {
|
||||
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<String, Builtin>) {
|
||||
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<String, Builtin>) {
|
||||
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<String, Builtin>) {
|
||||
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<String, Builtin>) {
|
||||
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()),
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user