Reduce max call stack size for debug.

This commit is contained in:
Stephen Chung
2020-10-08 23:00:01 +08:00
parent 1272eeb81a
commit d511aac7a4
5 changed files with 8 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
#![cfg(not(feature = "no_optimize"))]
use rhai::{Engine, EvalAltResult, OptimizationLevel, INT, RegisterFn};
use rhai::{Engine, EvalAltResult, OptimizationLevel, RegisterFn, INT};
#[test]
fn test_optimizer_run() -> Result<(), Box<EvalAltResult>> {

View File

@@ -10,10 +10,10 @@ fn test_stack_overflow_fn_calls() -> Result<(), Box<EvalAltResult>> {
engine.eval::<INT>(
r"
fn foo(n) { if n <= 1 { 0 } else { n + foo(n-1) } }
foo(8)
foo(7)
",
)?,
35
27
);
#[cfg(not(feature = "unchecked"))]