print floating point zero as 0.0 (#859)

This commit is contained in:
Mark Thom
2021-03-17 20:17:08 -06:00
parent 10af206024
commit 69b1798af7

View File

@@ -963,8 +963,8 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
match n {
Number::Float(fl) => {
if &fl == &OrderedFloat(0f64) {
push_space_if_amb!(self, "0", {
self.append_str("0");
push_space_if_amb!(self, "0.0", {
self.append_str("0.0");
});
} else {
let OrderedFloat(fl) = fl;