From ace046624d2e23fba67564a86af7f03ed8a48eae Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Thu, 29 Feb 2024 21:05:10 -0500 Subject: remove unwraps, fix utf8 --- matrix-lang/src/compiler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'matrix-lang/src/compiler.rs') diff --git a/matrix-lang/src/compiler.rs b/matrix-lang/src/compiler.rs index 95c6ccf..da1ecf7 100644 --- a/matrix-lang/src/compiler.rs +++ b/matrix-lang/src/compiler.rs @@ -142,7 +142,7 @@ impl<'c> Compiler<'c> { fn collapse_scopes(&mut self, top_scope: usize) { let mut cutoff = usize::MAX; while self.scopes.len() > top_scope { - cutoff = self.scopes.pop().unwrap() + cutoff = self.scopes.pop().expect("bypassed compiler scope check") } if cutoff < self.locals.len() { self.emit(Instruction::DiscardLocals((self.locals.len() - cutoff) as u16), self.last_pos()); -- cgit v1.2.3-freya