document bug fix in release notes

This commit is contained in:
Trevor Spiteri 2019-08-21 13:30:49 +02:00
parent 08fc9881e5
commit ba594f24e1
3 changed files with 21 additions and 0 deletions

View File

@ -58,6 +58,11 @@ Various conversion methods are available:
## Whats new ## Whats new
### Version 0.4.4 news (unreleased)
* Bug fix: rounding could produce bad output for [`Binary`],
[`Octal`], [`LowerHex`] and [`UpperHex`].
### Version 0.4.3 news (2019-08-20) ### Version 0.4.3 news (2019-08-20)
* The [*fixed* crate] now requires rustc version 1.34.0 or later. * The [*fixed* crate] now requires rustc version 1.34.0 or later.

View File

@ -5,6 +5,12 @@ modification, are permitted in any medium without royalty provided the
copyright notice and this notice are preserved. This file is offered copyright notice and this notice are preserved. This file is offered
as-is, without any warranty. --> as-is, without any warranty. -->
Version 0.4.4 (unreleased)
==========================
* Bug fix: rounding could produce bad output for `Binary`, `Octal`,
`LowerHex` and `UpperHex`.
Version 0.4.3 (2019-08-20) Version 0.4.3 (2019-08-20)
========================== ==========================

View File

@ -657,5 +657,15 @@ mod tests {
assert_eq!(format!("{:.0o}", i), "376"); assert_eq!(format!("{:.0o}", i), "376");
assert_eq!(format!("{:X}", i), "FE.8"); assert_eq!(format!("{:X}", i), "FE.8");
assert_eq!(format!("{:.0X}", i), "FE"); assert_eq!(format!("{:.0X}", i), "FE");
let i = U8F8::from_bits(0xFFDD);
assert_eq!(format!("{}", i), "254.863");
assert_eq!(format!("{:.1}", i), "254.9");
assert_eq!(format!("{:b}", i), "11111111.11011101");
assert_eq!(format!("{:.4b}", i), "11111111.1110");
assert_eq!(format!("{:o}", i), "375.672");
assert_eq!(format!("{:.1o}", i), "375.7");
assert_eq!(format!("{:X}", i), "FF.DD");
assert_eq!(format!("{:.1X}", i), "FF.E");
} }
} }