diff --git a/Cargo.toml b/Cargo.toml index f62d44c4..5096ffdf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" keywords = ["yaml", "serde"] [dependencies] -dtoa = "1.0" +ryu = "1.0" indexmap = "1.5" serde = "1.0.69" yaml-rust = "0.4.5" diff --git a/src/ser.rs b/src/ser.rs index 23acd412..b584f35a 100644 --- a/src/ser.rs +++ b/src/ser.rs @@ -518,7 +518,7 @@ impl ser::Serializer for SerializerToYaml { num::FpCategory::Infinite if v.is_sign_positive() => ".inf".into(), num::FpCategory::Infinite => "-.inf".into(), num::FpCategory::Nan => ".nan".into(), - _ => dtoa::Buffer::new().format_finite(v).into(), + _ => ryu::Buffer::new().format_finite(v).into(), })) } @@ -527,7 +527,7 @@ impl ser::Serializer for SerializerToYaml { num::FpCategory::Infinite if v.is_sign_positive() => ".inf".into(), num::FpCategory::Infinite => "-.inf".into(), num::FpCategory::Nan => ".nan".into(), - _ => dtoa::Buffer::new().format_finite(v).into(), + _ => ryu::Buffer::new().format_finite(v).into(), })) }