Commit graph

880 commits

Author SHA1 Message Date
Ethiraric
9ee2d113bc Fix error with comments after tags. 2024-04-16 12:03:42 +02:00
David Aguilar
976007017d garden: yaml-rust2 -> saphyr 2024-04-08 23:37:22 -07:00
Ethiraric
cbba46fa72 Have ScanError::new take a String.
Internally, `ScanError` stores a `String`. Having `new` take a `&str`
misleadingly indicates that it stores a `&str`. This commit changes
`new` so that it takes a `String`, and adds a convenience method,
`new_str` that takes a `&str` and allocates a `String` for it.
2024-04-07 02:04:45 +02:00
Ethiraric
3b1dee5ef7 Remove deprecated method implementations of Error. 2024-04-07 02:01:26 +02:00
maddymakesgames
5b3fa958b8 add Error and Display impls for LoadError 2024-04-07 01:52:24 +02:00
Ethiraric
8967f050f7 Convert to standalone repository. 2024-04-03 20:25:59 +02:00
Ethiraric
bdcf7f48f9 Remove yaml-rust2 dependency from tests. 2024-04-02 23:08:39 +02:00
Ethiraric
737f9d0ab1 Improve Parser's next() option handling. 2024-04-02 23:06:15 +02:00
Ethiraric
40670f3c48 Minor improvements. 2024-04-02 23:06:08 +02:00
Ethiraric
3365ccadb6 Readability improvement in tag handling. 2024-04-02 23:00:33 +02:00
Ethiraric
30b713d7a7 yaml-rust2 -> saphyr 2024-04-02 18:49:52 +02:00
Ethiraric
6b01b554e0 yaml-rust2 -> saphyr-parser
* Drop non-parser files
* Rename everything
* Fix tests
* Start rewriting a bit of docs
2024-04-02 17:14:06 +02:00
Ethiraric
d618d06061 Messed up the MSRV. 2024-03-30 19:39:53 +01:00
Ethiraric
787403daa1 Messed up the MSRV. 2024-03-30 19:39:53 +01:00
Ethiraric
f166970a3e Use cargo features. 2024-03-30 19:24:54 +01:00
Ethiraric
c90c1ed1fb Use cargo features. 2024-03-30 19:24:54 +01:00
Alistair Francis
0f1dedc584 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
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
Ethiraric
2642252f7f Add doc checks to before_commit. 2024-03-28 21:06:32 +01:00
Ethiraric
bf2aaf8044 Add doc checks to before_commit. 2024-03-28 21:06:32 +01:00
Ethiraric
bb3cc83120 Add doc checks to before_commit. 2024-03-28 21:03:14 +01:00
David Aguilar
2dc9e2c13f maint: version-up and minimize where we mention the version
Remove the version number from tools/gen_large_yaml so that we
can avoid needing to update the version in two places.
2024-03-25 22:25:46 -07:00
David Aguilar
5c7e11ea3f maint: version-up and minimize where we mention the version
Remove the version number from tools/gen_large_yaml so that we
can avoid needing to update the version in two places.
2024-03-25 22:25:46 -07:00
David Aguilar
4aad863f87 maint: version-up and minimize where we mention the version
Remove the version number from tools/gen_large_yaml so that we
can avoid needing to update the version in two places.
2024-03-25 22:25:46 -07:00
David Aguilar
b5c9eec454 yaml-rust2 v0.8.0 2024-03-25 22:18:38 -07:00
David Aguilar
f34c6869f1 yaml-rust2 v0.8.0 2024-03-25 22:18:38 -07:00
David Aguilar
ae65040d3b CHANGELOG: mention the linguist development-related updates 2024-03-25 22:18:37 -07:00
David Aguilar
67ec4899c0 CHANGELOG: mention the linguist development-related updates 2024-03-25 22:18:37 -07:00
David Aguilar
4a5ba3b499 garden: access yaml-rust2 pull requests as yaml-rust2/pull/* 2024-03-25 22:18:37 -07:00
David Aguilar
3f128e806c garden: access yaml-rust2 pull requests as yaml-rust2/pull/* 2024-03-25 22:18:37 -07:00
David Aguilar
134a1672cc garden: update urls and remove old forks and links
We have the commits in git now.
2024-03-25 22:18:37 -07:00
David Aguilar
728bd8b391 garden: update urls and remove old forks and links
We have the commits in git now.
2024-03-25 22:18:37 -07:00
Spenser Black
536e5f7ec4 Add linguist attributes for tests/*.rs.inc files
This informs Linguist (used by GitHub) that these files are Rust (they
are currently detected as C++). This also marks them as generated.
2024-03-25 20:11:04 +01:00
Spenser Black
c7689fb84b Add linguist attributes for tests/*.rs.inc files
This informs Linguist (used by GitHub) that these files are Rust (they
are currently detected as C++). This also marks them as generated.
2024-03-25 20:11:04 +01:00
John Vandenberg
992c9c29fb fix typos 2024-03-25 14:52:44 +01:00
John Vandenberg
6ec65e636f fix typos 2024-03-25 14:52:44 +01:00
John Vandenberg
95ac76e163 fix typos 2024-03-25 19:01:58 +08:00
David Aguilar
37f52b7722 README: update the installation snippet to use yaml-rust2 0.7 2024-03-24 17:00:57 -07:00
David Aguilar
697550e112 README: update the installation snippet to use yaml-rust2 0.7 2024-03-24 17:00:57 -07:00
David Aguilar
53b70cd93b README: add self-links to make things more discoverable
If someone lands on one of our forks on github there are still UI elements
that point them back to the original chyh1990 yaml-rust project.

Add links to make it easier to navigate back to the main fork when
viewing a yaml-rust2 fork.
2024-03-24 17:00:19 -07:00
David Aguilar
77bf4eaeef README: add self-links to make things more discoverable
If someone lands on one of our forks on github there are still UI elements
that point them back to the original chyh1990 yaml-rust project.

Add links to make it easier to navigate back to the main fork when
viewing a yaml-rust2 fork.
2024-03-24 17:00:19 -07:00
David Aguilar
ddb6885a17 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
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
cd2028aca7 parser: add Parser::new_from_str(&str) 2024-03-25 00:06:10 +01:00
David Aguilar
c00b27bb95 parser: add Parser::new_from_str(&str) 2024-03-25 00:06:10 +01:00
David Aguilar
21738031e3 parser: fixup typos from github 2024-03-24 15:01:38 -07:00
David Aguilar
61b0e70a4e parser: fixup typos from github 2024-03-24 15:01:38 -07:00
David Aguilar
782d590e5c parser: add Parser::new_from_str(&str) 2024-03-24 14:51:15 -07:00
David Aguilar
e9e428eeaf CHANGELOG: simplify the formatting and document YamlLoader::documents() 2024-03-24 14:45:52 -07:00
David Aguilar
86f008196c CHANGELOG: simplify the formatting and document YamlLoader::documents() 2024-03-24 14:45:52 -07:00