diff options
Diffstat (limited to '')
-rw-r--r-- | askama_shared/src/generator.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs index 4588677..64fa1f5 100644 --- a/askama_shared/src/generator.rs +++ b/askama_shared/src/generator.rs @@ -765,6 +765,9 @@ impl<'a> Generator<'a> { } fn dedent(&mut self) { + if self.indent == 0 { + panic!("dedent() called while indentation == 0"); + } self.indent -= 1; } } |