mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 15:40:16 +00:00
chore(doc/context): clarify context finalization limit error message
This commit is contained in:
@@ -168,13 +168,13 @@ impl SproutContext {
|
|||||||
let mut current_values = self.all_values();
|
let mut current_values = self.all_values();
|
||||||
|
|
||||||
// To ensure that there is no possible infinite loop, we need to check
|
// 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;
|
let mut iterations: usize = 0;
|
||||||
loop {
|
loop {
|
||||||
iterations += 1;
|
iterations += 1;
|
||||||
|
|
||||||
if iterations > CONTEXT_FINALIZE_ITERATION_LIMIT {
|
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;
|
let mut did_change = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user