From d83959d976d69d6de3bbd150c5cc46556456a824 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 14 Aug 2017 20:40:48 +0200 Subject: Assert invariant for SetChain implementation --- askama_derive/src/generator.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'askama_derive/src/generator.rs') diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs index b00094d..75e4a2d 100644 --- a/askama_derive/src/generator.rs +++ b/askama_derive/src/generator.rs @@ -589,5 +589,6 @@ impl<'a, T: 'a> SetChain<'a, T> where T: cmp::Eq + hash::Hash { } fn pop(&mut self) { self.scopes.pop().unwrap(); + assert!(self.scopes.len() > 0); } } -- cgit