only assert in debug builds

these are primarily used to detect bugs during e.g. fuzzing.

most of these asserts have negligible impact on performance, but if they
are not debug asserts it is not obvious that they dont affect
performance of release builds
This commit is contained in:
Noah Hellman 2023-02-26 18:10:20 +01:00
parent 3f011b9367
commit 1e5e56c463
5 changed files with 12 additions and 12 deletions

View file

@ -993,7 +993,7 @@ impl<'s> Parser<'s> {
class: (!ev.span.is_empty()).then(|| content),
},
block::Container::Footnote => {
assert!(enter);
debug_assert!(enter);
self.footnotes.insert(content, self.tree.take_branch());
self.block_attributes = Attributes::new();
continue;