From 396e397e578de59ca8c1e0a503b1958224489aaa Mon Sep 17 00:00:00 2001 From: sagie gur ari Date: Sat, 22 Apr 2023 19:36:29 +0000 Subject: [PATCH] Maintenance: Replace math evaluation crate to evalexpr --- CHANGELOG.md | 7 +++++- Cargo.lock | 24 ++++++--------------- test/std/collections/array_contains_test.ds | 2 +- test/std/math/calc_test.ds | 6 ++++++ 4 files changed, 20 insertions(+), 19 deletions(-) create mode 100644 test/std/math/calc_test.ds diff --git a/CHANGELOG.md b/CHANGELOG.md index cd1c7b0..91f29ad 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ ## CHANGELOG -### v0.8.17 (2022-01-21) +### v0.8.18 + +* Maintenance: Replace math evaluation crate to evalexpr +* Fix: fix array_contains command + +### v0.8.17 (2023-01-21) * Enhancement: New zip/unzip commands #294 (thanks @Red-Teapot) * Maintenance: Upgrade dependencies diff --git a/Cargo.lock b/Cargo.lock index c7297c8..63e7289 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -345,6 +345,7 @@ dependencies = [ "cfg-if", "colored", "duckscript", + "evalexpr", "fs_extra", "fsio", "glob", @@ -352,7 +353,6 @@ dependencies = [ "home", "ignore", "java-properties", - "meval", "num_cpus", "rand", "semver", @@ -442,6 +442,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" +[[package]] +name = "evalexpr" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0924058b5793a2ff91113f62c3de5e96df6d5ec0f10e213af090522fab820430" + [[package]] name = "fastrand" version = "1.8.0" @@ -754,16 +760,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" -[[package]] -name = "meval" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79496a5651c8d57cd033c5add8ca7ee4e3d5f7587a4777484640d9cb60392d9" -dependencies = [ - "fnv", - "nom", -] - [[package]] name = "miniz_oxide" version = "0.6.2" @@ -791,12 +787,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "nom" -version = "1.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b8c256fd9471521bcb84c3cdba98921497f1a331cbc15b8030fc63b82050ce" - [[package]] name = "num-integer" version = "0.1.45" diff --git a/test/std/collections/array_contains_test.ds b/test/std/collections/array_contains_test.ds index 782335d..d48404b 100644 --- a/test/std/collections/array_contains_test.ds +++ b/test/std/collections/array_contains_test.ds @@ -17,7 +17,7 @@ fn test_not_found assert_eq ${found} false end -fn test_found +fn test_found handle = array value found = array_contains ${handle} value diff --git a/test/std/math/calc_test.ds b/test/std/math/calc_test.ds new file mode 100644 index 0000000..08ab441 --- /dev/null +++ b/test/std/math/calc_test.ds @@ -0,0 +1,6 @@ + +fn test_calc + result = calc 1 + 5 * 7 + + assert_eq ${result} 36 +end