remove unwrap in Value::is_null
This commit is contained in:
parent
3c129780d0
commit
d90d998ccd
@ -116,7 +116,12 @@ impl Value {
|
||||
self.clone().eval(span)?.is_null(span)?
|
||||
}
|
||||
Self::List(v, _, Brackets::Bracketed) if v.is_empty() => false,
|
||||
Self::List(v, ..) => v.iter().all(|f| f.is_null(span).unwrap()),
|
||||
Self::List(v, ..) => v
|
||||
.iter()
|
||||
.map(|f| Ok(f.is_null(span)?))
|
||||
.collect::<SassResult<Vec<bool>>>()?
|
||||
.into_iter()
|
||||
.all(|f| f),
|
||||
_ => false,
|
||||
})
|
||||
}
|
||||
|
@ -230,3 +230,7 @@ error!(
|
||||
"a {color: \"", "Error: Expected \"."
|
||||
);
|
||||
error!(nothing_after_sgl_quote, "a {color: '", "Error: Expected '.");
|
||||
error!(
|
||||
invalid_binop_in_list,
|
||||
"a {color: foo % bar, baz;}", "Error: Undefined operation \"foo % bar\"."
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user