[READ-ONLY] Mirror of https://github.com/probablykasper/cpc. Text calculator with support for units and conversion cpc.kasper.space
calculator cli conversion converter library math package units units-converter wasm website
0

Configure Feed

Select the types of activity you want to include in your feed.

v1.0.2

Kasper (Oct 12, 2020, 8:45 PM +0200) 5f85d32f bb4bdb72

+11 -7
+4
CHANGELOG.md
··· 1 + ## 1.0.2 - 2020 Oct 12 2 + - Fix parsing of unit `Quarter` (#1) 3 + - Use division instead of multiplication when dividing numbers of the same unit `Quarter` (#1) 4 + 1 5 ## 1.0.1 - 2020 Aug 20 2 6 - Fixed the library not working 3 7 - Added documentation comments
+1 -1
Cargo.lock
··· 12 12 13 13 [[package]] 14 14 name = "cpc" 15 - version = "1.0.1" 15 + version = "1.0.2" 16 16 dependencies = [ 17 17 "decimal 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 18 18 ]
+1 -1
Cargo.toml
··· 1 1 [package] 2 2 name = "cpc" 3 - version = "1.0.1" 3 + version = "1.0.2" 4 4 description = "evaluates math expressions, with support for units and conversion between units" 5 5 authors = ["Kasper Henningsen"] 6 6 edition = "2018"
+4 -4
README.md
··· 200 200 1. Update `CHANGELOG.md` 201 201 2. Bump the version number in `Cargo.toml` and run `cargo check` 202 202 3. Run `cargo test` 203 - 3. Cross-compile cpc by following [the steps above](#cross-compiling) 204 - 4. Commit and tag in format `v1.0.0` 205 - 5. Publish on crates.io: 203 + 4. Cross-compile cpc by following [the steps above](#cross-compiling) 204 + 5. Commit and tag in format `v0.0.0` 205 + 6. Publish on crates.io: 206 206 1. Login by running `cargo login` and following the instructions 207 207 2. Test publish to ensure there are no issues 208 208 ``` ··· 212 212 ``` 213 213 cargo publish 214 214 ``` 215 - 6. Publish on GitHub 215 + 7. Publish on GitHub 216 216 1. Zip the binaries and rename them like `cpc-v1.0.0-darwin-x64` 217 217 2. Create GitHub release with release notes and attach the zipped binaries
+1 -1
src/units.rs
··· 420 420 // 1 km / 2 421 421 Ok(Number::new(left.value / right.value, right.unit)) 422 422 } else if lcat == rcat { 423 - // 1 km / 1 km 423 + // 4 km / 2 km 424 424 let (left, right) = convert_to_lowest(left, right)?; 425 425 Ok(Number::new(left.value / right.value, NoUnit)) 426 426 } else if (lcat == Area && rcat == Length) || (lcat == Volume && rcat == Area) {