We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d4568b commit 1f49c85Copy full SHA for 1f49c85
2 files changed
Cargo.toml
@@ -15,7 +15,7 @@ rust-version = "1.71"
15
exclude = ["src/css-parsing-tests/**", "src/big-data-url.css"]
16
17
[dependencies]
18
-dtoa-short = "0.3"
+zmij = "1.0.21"
19
itoa = "1.0"
20
smallvec = "1.0"
21
src/serializer.rs
@@ -46,10 +46,8 @@ where
46
return write!(dest, "{}", v);
47
}
48
49
- let notation = dtoa_short::write(dest, value)?;
50
- if value.fract() == 0. && !notation.decimal_point && !notation.scientific {
51
- dest.write_str(".0")?;
52
- }
+ dest.write_str(zmij::Buffer::new().format(value))?;
+
53
Ok(())
54
55
@@ -364,7 +362,7 @@ macro_rules! impl_tocss_for_float {
364
362
where
365
363
W: fmt::Write,
366
{
367
- dtoa_short::write(dest, *self).map(|_| ())
+ dest.write_str(zmij::Buffer::new().format(*self))
368
369
370
};
0 commit comments