From 734ab840547af40b34245b64ff3e6a7b5d33d622 Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Tue, 28 Oct 2025 00:10:22 -0400 Subject: [PATCH] chore(doc/context): clarify context finalization limit error message --- src/context.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/context.rs b/src/context.rs index a59c436..22998bc 100644 --- a/src/context.rs +++ b/src/context.rs @@ -168,13 +168,13 @@ impl SproutContext { let mut current_values = self.all_values(); // To ensure that there is no possible infinite loop, we need to check - // the number of iterations. If it exceeds 100, we bail. + // the number of iterations. If it exceeds CONTEXT_FINALIZE_ITERATION_LIMIT, we bail. let mut iterations: usize = 0; loop { iterations += 1; if iterations > CONTEXT_FINALIZE_ITERATION_LIMIT { - bail!("infinite loop detected in context finalization"); + bail!("maximum number of replacement iterations reached while finalizing context"); } let mut did_change = false;