@for non-integer error messages
This commit is contained in:
parent
659dfba1b2
commit
0adc6f90e3
@ -1,4 +1,3 @@
|
|||||||
use std::cmp::Ordering;
|
|
||||||
use std::fmt::{self, Display};
|
use std::fmt::{self, Display};
|
||||||
use std::iter::Peekable;
|
use std::iter::Peekable;
|
||||||
|
|
||||||
@ -144,7 +143,7 @@ impl AtRule {
|
|||||||
let from = match Value::from_tokens(&mut from_toks.into_iter().peekable(), scope)? {
|
let from = match Value::from_tokens(&mut from_toks.into_iter().peekable(), scope)? {
|
||||||
Value::Dimension(n, _) => match n.to_integer().to_usize() {
|
Value::Dimension(n, _) => match n.to_integer().to_usize() {
|
||||||
Some(v) => v,
|
Some(v) => v,
|
||||||
None => todo!(),
|
None => return Err(format!("{} is not a int.", n).into()),
|
||||||
},
|
},
|
||||||
v => return Err(format!("{} is not a number.", v).into()),
|
v => return Err(format!("{} is not a number.", v).into()),
|
||||||
};
|
};
|
||||||
@ -159,7 +158,7 @@ impl AtRule {
|
|||||||
let to = match Value::from_tokens(&mut to_toks.into_iter().peekable(), scope)? {
|
let to = match Value::from_tokens(&mut to_toks.into_iter().peekable(), scope)? {
|
||||||
Value::Dimension(n, _) => match n.to_integer().to_usize() {
|
Value::Dimension(n, _) => match n.to_integer().to_usize() {
|
||||||
Some(v) => v,
|
Some(v) => v,
|
||||||
None => todo!(),
|
None => return Err(format!("{} is not a int.", n).into()),
|
||||||
},
|
},
|
||||||
v => return Err(format!("{} is not a number.", v).into()),
|
v => return Err(format!("{} is not a number.", v).into()),
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user