Skip to content

Commit

Permalink
dec: prepare 0.4.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Loiselle committed May 20, 2021
1 parent 4ed6de0 commit 7efe5a7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ libdecnumber.
```
# Cargo.toml
[dependencies]
dec = "0.3.3"
dec = "0.4.0"
```

**[View documentation.](https://docs.rs/dec/0.3.3/)**
**[View documentation.](https://docs.rs/dec/0.4.0/)**

## decnumber-sys [![crates.io](https://img.shields.io/crates/v/decnumber-sys.svg)](https://crates.io/crates/decnumber-sys)

Expand Down
33 changes: 24 additions & 9 deletions dec/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,44 @@ All notable changes to this crate will be documented in this file.
The format is based on [Keep a Changelog], and this crate adheres to [Semantic
Versioning].

## Unreleased
## 0.4.0 - 2021-05-20

* Fix a bug that caused all `to_standard_notation_string` implementations to
hang on non-finite values, e.g. `NaN`.
* Add the following methods:

* Remove the `arbitrary-precision` feature. The arbitrary-precision `Decimal`
type is now always compiled.
- `Decimal::infinity`
- `Decimal::nan`
- `Decimal::rescale`
- `Decimal::to_standard_notation_string`
- `Decimal::set_exponent`
- `Decimal::to_width` to support casting between different widths of `Decimal`.
- `Decimal::coefficient<T>...where T: TryFrom<Decimal<N>>` to return
`Decimal`'s coefficients as arbitrary primitive integers.
- `Context::<Decimal<N>>::sum`
- `Context::<Decimal<N>>::product`
- `Context::set_status`

* Add the `Decimal::infinity`, `Decimal::nan`, `Decimal::rescale`, and
`Decimal::to_standard_notation_string` methods.
* Implement `TryInto<Decimal<N>>` for all primitive integers.

* Implement `From<u32>`, `From<u64>`, `From<i32>`, `From<i64>`, `From<usize>`,
`From<isize>`, `PartialOrd` and `PartialEq` for `Decimal`.

* Enable using `OrderedDecimal` with the `Decimal` type.
* Support negating `Decimal` values.

* Add the `Context::set_status` method.
* Derive the `Copy` trait for `Decimal`.

* Remove the `arbitrary-precision` feature. The arbitrary-precision `Decimal`
type is now always compiled.

* Enable using `OrderedDecimal` with the `Decimal` type.

* Implement `BitAnd`, `BitAndAssign`, `BitOr`, and `BitOrAssign` for `Status`.

* Implement `serde::Serialize` and `serde::Deserialize` for `Decimal` when the
`serde` feature is activated.

* Fix a bug that caused all `to_standard_notation_string` implementations to
hang on non-finite values, e.g. `NaN`.

## 0.3.3 - 2021-03-10

* Fix bug that could cause `to_standard_notation_string` to misplace the decimal
Expand Down
2 changes: 1 addition & 1 deletion dec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repository = "https://github.com/MaterializeInc/rust-decnumber"
license = "Apache-2.0"
categories = ["api-bindings"]
keywords = ["decimal", "decnumber"]
version = "0.3.3"
version = "0.4.0"
edition = "2018"

[dependencies]
Expand Down

0 comments on commit 7efe5a7

Please sign in to comment.