Commit graph

10 commits

Author SHA1 Message Date
Alistair Francis
1fb76ae745 yaml: Implement IndexMut
This implements the IndexMut trait for Yaml. This allows indexing the
Yaml type while having a mutable reference.

Unlike the Index, this will panic on a failure. That is allowed as per
the Rust documentation [1]. We don't have the option of returning a
mutable reference to BAD_VALUE as that is unsafe. So instead we just
panic.

1: https://doc.rust-lang.org/std/ops/trait.IndexMut.html#tymethod.index_mut

Resolves: https://github.com/chyh1990/yaml-rust/issues/123
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Co-authored-by: Ethiraric <ethiraric@gmail.com>
2024-03-30 18:52:39 +01:00
David Aguilar
f34c6869f1 yaml-rust2 v0.8.0 2024-03-25 22:18:38 -07:00
David Aguilar
67ec4899c0 CHANGELOG: mention the linguist development-related updates 2024-03-25 22:18:37 -07:00
David Aguilar
d7f7c7ce15 yaml: add YamlLoader::load_from_parser(&Parser)
Make it easier to load documents from a prebuilt Parser.
2024-03-25 00:06:10 +01:00
David Aguilar
86f008196c CHANGELOG: simplify the formatting and document YamlLoader::documents() 2024-03-24 14:45:52 -07:00
David Aguilar
06708ee787 CHANGELOG: document the keep_tags API addition 2024-03-24 14:27:04 -07:00
Ethiraric
ee92e953f1 Switch from encoding to encoding_rs.
See https://github.com/rustsec/advisory-db/issues/1605.
2024-03-24 17:14:44 +01:00
David Aguilar
d9a3d49468 CHANGELOG: move recent updates to v0.7.0 and add a v0.6.0 section 2024-03-20 14:21:27 +01:00
David Aguilar
9e505d552f Eliminate panics and enable the missing panics docs check 2024-03-19 15:26:16 +01:00
David Aguilar
b2bed366cf Add a CHANGELOG to keep track of yaml-rust2 development 2024-03-19 15:26:16 +01:00