move code with side effects out of assert
@@ -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();
