Add an assert.

This commit is contained in:
Tom Alexander 2022-12-11 00:08:39 -05:00
parent 7cb85fc8af
commit 103dcbea35
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
1 changed files with 2 additions and 0 deletions

View File

@ -57,6 +57,8 @@ where
{
move |mut i: I| {
let mut current_context = context.clone();
// Despite the clone, the Rc should still point to the same value, otherwise we'll get stuck in an endless loop.
assert!(current_context.ptr_eq(context));
loop {
let len = i.input_len();
match till_matcher(&current_context, i.clone()) {