Fix benchmark.

This commit is contained in:
Stephen Chung 2022-01-22 23:02:32 +08:00
parent fb0b071fe0
commit 5c0cf70f70

View File

@ -3,7 +3,7 @@
///! Test evaluating with scope
extern crate test;
use rhai::{Engine, Module, OptimizationLevel};
use rhai::{Engine, Module, OptimizationLevel, Scope};
use test::Bencher;
#[bench]
@ -18,7 +18,7 @@ fn bench_eval_module(bench: &mut Bencher) {
let ast = engine.compile(script).unwrap();
let module = Module::eval_ast_as_new(&mut Scope::new(), &ast, &engine).unwrap();
let module = Module::eval_ast_as_new(Scope::new(), &ast, &engine).unwrap();
engine.register_static_module("testing", module.into());