Get rid of inaccurate debug assertion

This commit is contained in:
Ayaz Hafiz 2023-03-28 14:19:43 -05:00
parent 6de36f29f9
commit 18858b9eb3
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -4607,18 +4607,9 @@ pub fn gather_tags_unsorted_iter(
let mut stack = vec![other_fields];
#[cfg(debug_assertions)]
let mut seen_head_union = false;
loop {
match subs.get_content_without_compacting(ext.var()) {
Structure(TagUnion(sub_fields, sub_ext)) => {
#[cfg(debug_assertions)]
{
assert!(!seen_head_union, "extension variable is another tag union, but I expected it to be either open or closed!");
seen_head_union = true;
}
stack.push(*sub_fields);
ext = *sub_ext;