move code with side effects out of assert

This commit is contained in:
Connor Skees 2020-12-06 14:17:16 -05:00
parent 884b92f476
commit d1be778682

View File

@ -23,7 +23,8 @@ impl VariableValue {
impl<'a> Parser<'a> {
pub(super) fn parse_variable_declaration(&mut self) -> SassResult<()> {
assert!(matches!(self.toks.next(), Some(Token { kind: '$', .. })));
let next = self.toks.next();
assert!(matches!(next, Some(Token { kind: '$', .. })));
let ident: Identifier = self.parse_identifier_no_interpolation(false)?.node.into();
self.whitespace_or_comment();