From d1be7786829c730c764dd4ecf25abfb31d1d4936 Mon Sep 17 00:00:00 2001 From: Connor Skees Date: Sun, 6 Dec 2020 14:17:16 -0500 Subject: [PATCH] move code with side effects out of assert --- src/parse/variable.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/parse/variable.rs b/src/parse/variable.rs index b712947..3ffc1a7 100644 --- a/src/parse/variable.rs +++ b/src/parse/variable.rs @@ -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();