Skip to content

v0.12.3

Latest

Choose a tag to compare

@juntyr juntyr released this 28 Oct 08:20

What's Changed

API Changes

  • Added the ron::de::from_value convenience function to deserialize a T from a Value (#618)
  • Removed the once_cell dependency (#625)

Format Changes

  • Add support for parsing Rust-style string continuation escapes (#617)
  • Serialise very large and very small floats in exponent notation, e.g. 1e300 instead of a 303-character decimal expansion (#638)

Bug Fixes

  • Fixed round-tripping of compact ranges whose start bound is inf or NaN (#605)
  • Fixed enforcement of recursion_limit for nested enum variants deserialised through serde's Content (e.g. untagged enums) (#632)
  • Fixed -NaN losing its sign when parsed as an untyped float on some targets, e.g. riscv64 (#634)
  • Fixed RawValue accepting unclosed line comments and extensions when deserialised from a non-RON format, e.g. JSON, which produced invalid RON on serialisation (#636)
  • Fixed RawValue::from_ron accepting #![type = "..."] and #![schema = "..."] attributes, which produced invalid RON when the raw value was serialised inside another value (#642)
  • Fixed compact_ranges dropping the struct name and newtype variant unwrapping when a range with non-numeric bounds is written as a struct (#629)
  • Fixed quadratic backtracking over malformed strings when checking for a newtype or tuple inside untagged enums or unwrapped newtype variants (#639)
  • Fixed RawValue accumulating extra whitespace around nested values each time a pretty-printed file is read and written again; non-comment whitespace around a nested RawValue is now trimmed on deserialisation (#640)
  • Fixed newtype variants deserialised through serde's Content (e.g. untagged enums) rejecting a trailing comma and not checking for the closing ), which accepted unbalanced parentheses (#643)
  • Fixed a comment directly after a string, byte string, or char literal being read as code when checking for a newtype or tuple inside untagged enums or unwrapped newtype variants, which rejected valid input or changed how it was deserialised (#644)
  • Fixed Value preallocating its sequence or map from an uncapped size hint when deserialised from a non-RON format, e.g. CBOR, so that a forged length aborted the process (#647)
  • Fixed untyped ranges, e.g. Value or untagged enums, rejecting an inf or NaN end bound after .. (as in 0.0..inf and ..NaN) or a byte literal end bound after a bare .. (as in ..b'z'), which broke round-tripping compact ranges with an infinite end bound (#648)
  • Fixed path_meta doc comments always ending with \n instead of PrettyConfig::new_line, which mixed line endings when using e.g. "\r\n" (#649)

Documentation

  • Mention the Zed extension in the tooling table (#630)
  • Add enum variants to the syntax overview in the README (#633)
  • Document no_std configuration and the global allocator requirement (#626)
  • Added "other implementations" section to the README (#628)
  • Fix the unwrap_variant_newtypes and implicit_some examples in the extensions docs, which did not enable their extension, and show how to enable extensions programmatically (#645)
  • Fixed mismatches between the docs/grammar.md and parser (char and Unicode escapes, backslashes in strings, whitespace around range operators and before extensions) (#635)

Miscellaneous

  • Remove the unsafe block from RawValue::trim_boxed (#646)

New Contributors

Full Changelog: v0.12.2...v0.12.3