remove unwrap in favor of if let
This commit is contained in:
parent
da768badea
commit
34f9436163
@ -839,7 +839,7 @@ impl Value {
|
|||||||
}
|
}
|
||||||
q @ '>' | q @ '<' => {
|
q @ '>' | q @ '<' => {
|
||||||
let mut span = toks.next().unwrap().pos();
|
let mut span = toks.next().unwrap().pos();
|
||||||
IntermediateValue::Op(if toks.peek().unwrap().kind == '=' {
|
IntermediateValue::Op(if let Some(Token { kind: '=', ..}) = toks.peek() {
|
||||||
span = span.merge(toks.next().unwrap().pos());
|
span = span.merge(toks.next().unwrap().pos());
|
||||||
match q {
|
match q {
|
||||||
'>' => Op::GreaterThanEqual,
|
'>' => Op::GreaterThanEqual,
|
||||||
|
@ -172,3 +172,7 @@ error!(
|
|||||||
ends_with_single_eq,
|
ends_with_single_eq,
|
||||||
"a {color: 1 =", "Error: expected \"=\"."
|
"a {color: 1 =", "Error: expected \"=\"."
|
||||||
);
|
);
|
||||||
|
error!(
|
||||||
|
nothing_after_gt,
|
||||||
|
"a {color: 1 >", "Error: Expected expression."
|
||||||
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user