diff --git a/CHANGELOG.md b/CHANGELOG.md index a66ec8d..7a624b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.1.0 - 2020 Nov 14 +- Added units of frequency +- Added support using foot-inch syntax with addition, like `2"+6'4"` +- Unsupported foot-inch syntax like `(6)'4"` and `6'4!"` now cause errors +- Fixed README.md stating the performance is 1000x slower than it actually is +- Fixed trailing percentage signs being ignored when `allow_trailing_operators` is true +- Fixed error caused by consecutive percentage signs + ## 1.0.2 - 2020 Oct 12 - Fix parsing of unit `Quarter` (#1) - Use division instead of multiplication when dividing numbers of the same unit `Quarter` (#1) diff --git a/Cargo.lock b/Cargo.lock index b19aabb..d0b82c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,7 +12,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cpc" -version = "1.0.2" +version = "1.1.0" dependencies = [ "decimal 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/Cargo.toml b/Cargo.toml index 4dfec46..a7f8767 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cpc" -version = "1.0.2" +version = "1.1.0" description = "evaluates math expressions, with support for units and conversion between units" authors = ["Kasper Henningsen"] edition = "2018" diff --git a/README.md b/README.md index 8f99c82..1a54d1e 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ match eval("3m + 1cm", true, Unit::Celcius, false) { (4 + 1)km to light years -10m/2s * 5s +10m/2s * 5 trillion s 1 lightyear * 0.001mm in km2 @@ -165,9 +165,6 @@ match string { ``` ### Potential Improvements -#### General -- The functions in units.rs have a lot of manual if statements. This could probably be replaced with a pretty advanced macro. -- Support for lexing words, like `one billion` #### Potential unit types Nice list of units: https://support.google.com/websearch/answer/3284611 - Currency: How would you go about dynamically updating the weights?