Skip to content

Commit

Permalink
Merge pull request #357 from paupino/version/1.12.2
Browse files Browse the repository at this point in the history
Version 1.12.2
  • Loading branch information
paupino committed Apr 24, 2021
2 parents 55de203 + 6779bec commit 5f7f94f
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "MIT"
name = "rust_decimal"
readme = "./README.md"
repository = "https://github.com/paupino/rust-decimal"
version = "1.12.1"
version = "1.12.2"
exclude = [ "tests/generated/*" ]

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ assert_eq!("3.1415926535897932384626433832", pi.to_string());
* [rust-fuzz](#rust-fuzz)
* [serde-float](#serde-float)
* [serde-str](#serde-str)
* [serde-arbitrary-precision](#serde-arbitrary-precision)
* [std](#std)

## `db-postgres`
Expand Down
5 changes: 5 additions & 0 deletions VERSION.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Version History

## 1.12.2

Fixes small regression whereby `0 - 0` was producing `-0`. Thank you [@KonishchevDmitry](https://github.com/KonishchevDmitry) for
providing a swift fix ([#356](https://github.com/paupino/rust-decimal/pull/356)).

## 1.12.1

Added `num_traits::Zero` back to `rust_decimal::prelude` to prevent unnecessary downstream dependency breakages.
Expand Down
4 changes: 2 additions & 2 deletions macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rust_decimal_macros"
version = "1.12.1"
version = "1.12.2"
authors = ["Paul Mason <paul@form1.co.nz>"]
edition = "2018"
description = "Shorthand macros to assist creating Decimal types."
Expand All @@ -12,7 +12,7 @@ categories = ["science","data-structures"]
license = "MIT"

[dependencies]
rust_decimal = { path = "..", version = "1.12.1" }
rust_decimal = { path = "..", version = "1.12.2" }
quote = "1.0"

[features]
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
//! * [rust-fuzz](#rust-fuzz)
//! * [serde-float](#serde-float)
//! * [serde-str](#serde-str)
//! * [serde-arbitrary-precision](#serde-arbitrary-precision)
//! * [std](#std)
//!
//! ## `db-postgres`
Expand Down
6 changes: 6 additions & 0 deletions tests/decimal_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ fn it_adds_decimals() {

let tests = &[
("0", "0", "0"),
("0", "-0", "0"),
("-0", "0", "0"),
("-0", "-0", "0"),
("2", "3", "5"),
("2454495034", "3451204593", "5905699627"),
("24544.95034", ".3451204593", "24545.2954604593"),
Expand Down Expand Up @@ -413,6 +416,9 @@ fn it_subtracts_decimals() {

let tests = &[
("0", "0", "0"),
("0", "-0", "0"),
("-0", "0", "0"),
("-0", "-0", "0"),
("2", "3", "-1"),
("3451204593", "2323322332", "1127882261"),
("24544.95034", ".3451204593", "24544.6052195407"),
Expand Down

0 comments on commit 5f7f94f

Please sign in to comment.