Skip to content

v0.8.1

Compare
Choose a tag to compare
@Ethiraric Ethiraric released this 31 May 15:22
· 11 commits to master since this release

Bug fixes

  • (#29) Fix parsing failing for deeply indented scalar blocks.

  • (#21-comment) Fix parsing failing with comments immediately following a YAML tag.

Features

  • (#19) Yaml now implements IndexMut<usize> and IndexMut<&'a str>. These functions may not return a mutable reference to a BAD_VALUE. Instead, index_mut() will panic if either:

    • The index is out of range, as per IndexMut's requirements
    • The inner Yaml variant doesn't match Yaml::Array for usize or Yaml::Hash for &'a str
  • Use cargo features

    This allows for more fine-grained control over MSRV and to completely remove debug code from the library when it is consumed.

    The encoding feature, governing the YamlDecoder, has been enabled by default. Users of @davvid's fork of yaml-rust or of yaml-rust2 might already use this. Users of the original yaml-rust crate may freely disable this feature (cargo <...> --no-default-features) and lower MSRV to 1.65.0.

  • Duplicate keys no longer allowed

    Instead of silently choosing one of two values sharing the same key in a mapping, we now issue an error. This behavior is part of the YAML specification, but not tested by the yaml-test-suite (the parser needs to emit events for both key-values). Additionally, there is no standard way of defining which value should be chosen in case of a duplicate.