Skip to content

Commit

Permalink
Minor doc updates for version release
Browse files Browse the repository at this point in the history
  • Loading branch information
paupino committed Jun 19, 2021
1 parent 092fdf8 commit 8d2829b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions VERSION.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Fixes an issue[#398](https://github.com/paupino/rust-decimal/issues/398) where `Decimal::ZERO.ln()` would panic rather than returning `Decimal::ZERO`. This
aligns the behavior with calling `ln` on negative decimals.

Thank you to [@SebRollen](https://github.com/SebRollen) for finding and fixing this.

## 1.14.2

Fixes an overflow issue during division under some specific circumstances. ([#392](https://github.com/paupino/rust-decimal/issues/392))
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.14.2"
version = "1.14.3"
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.14.2" }
rust_decimal = { path = "..", version = "1.14.3" }
quote = "1.0"

[features]
Expand Down
10 changes: 5 additions & 5 deletions src/decimal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,14 +542,14 @@ impl Decimal {
/// # Example
///
/// ```
/// use rust_decimal::Decimal;
/// use rust_decimal::prelude::*;
///
/// let mut number = Decimal::new(1_123, 3);
/// let mut number = Decimal::from_str("1.123").unwrap();
/// number.rescale(6);
/// assert_eq!(number, Decimal::new(1_123_000, 6));
/// let mut round = Decimal::new(145, 2);
/// assert_eq!(number.to_string(), "1.123000");
/// let mut round = Decimal::from_str("1.45").unwrap();
/// round.rescale(1);
/// assert_eq!(round, Decimal::new(15, 1));
/// assert_eq!(round.to_string(), "1.5");
/// ```
pub fn rescale(&mut self, scale: u32) {
let mut array = [self.lo, self.mid, self.hi];
Expand Down

0 comments on commit 8d2829b

Please sign in to comment.