Update to rust master
This commit is contained in:
parent
95c6161dce
commit
f16498b8db
|
@ -14,3 +14,8 @@ A native Rust encoder and decoder of TOML-formatted files and streams. Provides
|
||||||
implementations of the standard Encodable/Decodable traits for TOML data to
|
implementations of the standard Encodable/Decodable traits for TOML data to
|
||||||
facilitate deserializing and serializing Rust structures.
|
facilitate deserializing and serializing Rust structures.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
[profile.dev]
|
||||||
|
debug = false
|
||||||
|
[profile.test]
|
||||||
|
debug = false
|
||||||
|
|
|
@ -20,9 +20,9 @@ fn to_json(toml: Value) -> Json {
|
||||||
Float(f) => doit("float", Json::String({
|
Float(f) => doit("float", Json::String({
|
||||||
let (bytes, _) =
|
let (bytes, _) =
|
||||||
strconv::float_to_str_bytes_common(f, 10, true,
|
strconv::float_to_str_bytes_common(f, 10, true,
|
||||||
strconv::SignNeg,
|
strconv::SignFormat::SignNeg,
|
||||||
strconv::DigMax(15),
|
strconv::SignificantDigits::DigMax(15),
|
||||||
strconv::ExpNone,
|
strconv::ExponentFormat::ExpNone,
|
||||||
false);
|
false);
|
||||||
let s = String::from_utf8(bytes).unwrap();
|
let s = String::from_utf8(bytes).unwrap();
|
||||||
if s.as_slice().contains(".") {s} else {format!("{}.0", s)}
|
if s.as_slice().contains(".") {s} else {format!("{}.0", s)}
|
||||||
|
|
Loading…
Reference in a new issue