Fix test.

This commit is contained in:
Stephen Chung 2020-11-01 16:02:10 +08:00
parent a2e2b5e2ef
commit 3485f9b00b
2 changed files with 3 additions and 2 deletions

View File

@ -24,6 +24,7 @@ Breaking changes
New features New features
------------ ------------
* `f32_float` feature to set `FLOAT` to `f32`.
* Low-level API for custom syntax allowing more flexibility in designing the syntax. * Low-level API for custom syntax allowing more flexibility in designing the syntax.
* `Module::fill_with` to poly-fill a module with another. * `Module::fill_with` to poly-fill a module with another.

View File

@ -1,7 +1,7 @@
#![cfg(not(feature = "no_module"))] #![cfg(not(feature = "no_module"))]
use rhai::{ use rhai::{
module_resolvers::StaticModuleResolver, Dynamic, Engine, EvalAltResult, ImmutableString, module_resolvers::StaticModuleResolver, Dynamic, Engine, EvalAltResult, ImmutableString,
Module, ParseError, ParseErrorType, Scope, FLOAT, INT, Module, ParseError, ParseErrorType, Scope, INT,
}; };
#[test] #[test]
@ -81,7 +81,7 @@ fn test_module_resolver() -> Result<(), Box<EvalAltResult>> {
#[cfg(not(feature = "no_float"))] #[cfg(not(feature = "no_float"))]
module.set_fn_4_mut( module.set_fn_4_mut(
"sum_of_three_args".to_string(), "sum_of_three_args".to_string(),
|target: &mut INT, a: INT, b: INT, c: FLOAT| { |target: &mut INT, a: INT, b: INT, c: rhai::FLOAT| {
*target = a + b + c as INT; *target = a + b + c as INT;
Ok(()) Ok(())
}, },