Skip to content

Commit

Permalink
(test) adopt break changes in rhai 0.19.15
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Apr 6, 2021
1 parent b9614b6 commit 7b373f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pest_derive = "2.1.0"
serde = "1.0.0"
serde_json = "1.0.39"
walkdir = { version = "2.2.3", optional = true }
rhai = { version = "0.19.6", optional = true, features = ["sync", "serde"] }
rhai = { version = "0.19.15", optional = true, features = ["sync", "serde"] }

[dev-dependencies]
env_logger = "0.8"
Expand Down
6 changes: 3 additions & 3 deletions src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ mod test {
fn test_script_helper() {
let mut reg = Registry::new();

reg.register_script_helper("acc", "params.reduce(|sum, x| x + sum, || 0 )")
reg.register_script_helper("acc", "params.reduce(|sum, x| x + sum, 0)")
.unwrap();

assert_eq!(
Expand All @@ -1054,7 +1054,7 @@ mod test {
let file1_path = dir.path().join("acc.rhai");
{
let mut file1: File = File::create(&file1_path).unwrap();
write!(file1, "params.reduce(|sum, x| x + sum, || 0 )").unwrap();
write!(file1, "params.reduce(|sum, x| x + sum, 0)").unwrap();
}

reg.register_script_helper_file("acc", &file1_path).unwrap();
Expand All @@ -1066,7 +1066,7 @@ mod test {

{
let mut file1: File = File::create(&file1_path).unwrap();
write!(file1, "params.reduce(|sum, x| x * sum, || 1 )").unwrap();
write!(file1, "params.reduce(|sum, x| x * sum, 1)").unwrap();
}

assert_eq!(
Expand Down

0 comments on commit 7b373f7

Please sign in to comment.