do a better job of printing integral floats.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "scryer-prolog"
|
name = "scryer-prolog"
|
||||||
version = "0.8.14"
|
version = "0.8.15"
|
||||||
authors = ["Mark Thom <markjordanthom@gmail.com>"]
|
authors = ["Mark Thom <markjordanthom@gmail.com>"]
|
||||||
repository = "https://github.com/mthom/scryer-prolog"
|
repository = "https://github.com/mthom/scryer-prolog"
|
||||||
description = "A modern Prolog implementation written mostly in Rust."
|
description = "A modern Prolog implementation written mostly in Rust."
|
||||||
|
|||||||
@@ -507,11 +507,12 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter>
|
|||||||
self.append_str("0");
|
self.append_str("0");
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
let output_str = format!("{}", fl);
|
let OrderedFloat(fl) = fl;
|
||||||
|
let output_str = format!("{0:<20?}", fl);
|
||||||
|
|
||||||
push_space_if_amb!(self, &output_str, {
|
push_space_if_amb!(self, &output_str, {
|
||||||
self.append_str(&output_str);
|
self.append_str(&output_str.trim());
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
Constant::Number(n) => {
|
Constant::Number(n) => {
|
||||||
let output_str = format!("{}", n);
|
let output_str = format!("{}", n);
|
||||||
|
|||||||
Reference in New Issue
Block a user