diff --git a/Cargo.toml b/Cargo.toml index 23ad063e0..242f05b6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serde_json" -version = "1.0.135" +version = "1.0.137" authors = ["Erick Tryzelaar ", "David Tolnay "] categories = ["encoding", "parser-implementations", "no-std"] description = "A JSON serialization file format" @@ -38,7 +38,7 @@ targets = ["x86_64-unknown-linux-gnu"] rustdoc-args = ["--generate-link-to-definition"] [package.metadata.playground] -features = ["raw_value"] +features = ["float_roundtrip", "raw_value", "unbounded_depth"] ### FEATURES ################################################################# diff --git a/src/lib.rs b/src/lib.rs index 60a26ca8c..07090dd0c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -299,7 +299,7 @@ //! [macro]: crate::json //! [`serde-json-core`]: https://github.com/rust-embedded-community/serde-json-core -#![doc(html_root_url = "https://docs.rs/serde_json/1.0.135")] +#![doc(html_root_url = "https://docs.rs/serde_json/1.0.137")] // Ignored clippy lints #![allow( clippy::collapsible_else_if, diff --git a/src/value/ser.rs b/src/value/ser.rs index a68193437..1ffe7b7f1 100644 --- a/src/value/ser.rs +++ b/src/value/ser.rs @@ -261,9 +261,9 @@ impl serde::Serializer for Serializer { }) } - fn serialize_map(self, _len: Option) -> Result { + fn serialize_map(self, len: Option) -> Result { Ok(SerializeMap::Map { - map: Map::new(), + map: Map::with_capacity(len.unwrap_or(0)), next_key: None, }) }