dtolnay/ryu

An extra .0 compares to std

Austaras opened this issue · 2 comments

use ryu;

fn main() {
    let mut buffer = ryu::Buffer::new();
    println!("{} {}", buffer.format(300_f64), 300_f64);
}

would get 300.0 300.

Why and is there a public API to remove it?

I am meeting this problem also

It is not a goal to match the formatting output of libcore exactly. In fact the readme describes another case where the formatting is different. The chosen formatting is intentional.