commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
ebe27e2cc5c9e9003da9c01f0ea931e3eda00545 | Wesley Moore | 2020-01-09T02:39:38 | style: use inclusive range for iterating over code points
Closes #20 | diff --git a/src/general_category.rs b/src/general_category.rs
index c7c143a..d3334e6 100644
--- a/src/general_category.rs
+++ b/src/general_category.rs
@@ -36,7 +36,7 @@ pub fn command(args: ArgMatches) -> Result<()> {
// As a special case, collect all unassigned codepoints.
let unassigned_name = propvals.ca... | 1 | 1 | 1 |
04248cbae432d0920c3f2a85f5ebc24adbf48f29 | Wesley Moore | 2019-12-05T05:49:32 | cli: add option to generate general-category as a Rust enum | diff --git a/src/app.rs b/src/app.rs
index d941979..7f61528 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -191,6 +191,9 @@ pub fn app() -> App<'static, 'static> {
"Emit a single table that maps codepoints to categories.",
),
)
+ .arg(Arg::with_name("rust-enum").long("rust-enu... | 2 | 7 | 1 |
cb110ce4abc97d596f7163606e52ab2f23ee6aa9 | Andrew Gallant | 2020-01-09T16:57:27 | api: suppress deprecation warnings
We can't just remove 'description' altogether, since that would be a
breaking change. We'll do it in the next breaking semver releases. | diff --git a/src/error.rs b/src/error.rs
index b86ed16..b8d5ad1 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -27,6 +27,8 @@ impl Error {
}
impl error::Error for Error {
+ // TODO: Remove on next semver bump.
+ #[allow(deprecated)]
fn description(&self) -> &str {
match *self {
Err... | 3 | 8 | 0 |
254f2100906024b18a6394b4513284a092cff83d | Andrew Gallant | 2020-01-09T16:46:34 | regex: use conditional compilation
Previously, we were unconditionally calling to_u32 and to_u64 even though
those aren't available when the target pointer width is too small.
Fixes #13 | diff --git a/src/regex.rs b/src/regex.rs
index a63ea5e..d01e809 100644
--- a/src/regex.rs
+++ b/src/regex.rs
@@ -21,15 +21,20 @@ pub fn command_dfa(args: ArgMatches) -> Result<()> {
let dfa = dfa.to_u16()?.to_sparse()?;
wtr.sparse_dfa(args.name(), &dfa)?;
}
+ #[... | 1 | 12 | 2 |
b02711f391e0bf186d8c7585f798e8596a7659cc | Andrew Gallant | 2020-01-09T16:45:39 | deps: trim down regex deps
Because we don't really care about performance of regex matching here. | diff --git a/Cargo.lock b/Cargo.lock
index 4927c34..6567eb6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,13 +1,5 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
-[[package]]
-name = "aho-corasick"
-version = "0.7.6"
-source = "registry+https://github.com/rust-lang/crate... | 2 | 5 | 28 |
61cf7a22a523da4b81cb5c82056badcf4d1fe31a | Andrew Gallant | 2020-01-09T15:38:19 | deps: update everything | diff --git a/Cargo.lock b/Cargo.lock
index 8413a64..4927c34 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "aho-corasick"
-version = "0.7.4"
+version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"... | 1 | 49 | 49 |
31fd9c589abaab5723557d1039f34656ca5cb06d | Wesley Moore | 2019-12-03T23:53:27 | script: add rust enum option
This is like --enum, but uses an actual Rust enum instead.
Closes #15 | diff --git a/src/app.rs b/src/app.rs
index 38cf45d..bd4df15 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -217,6 +217,9 @@ pub fn app() -> App<'static, 'static> {
.arg(Arg::with_name("enum")
.long("enum")
.help("Emit a single table that maps codepoints to scripts."))
+ .arg(Arg::... | 4 | 108 | 9 |
5009af218b8767854de6d061f54c65e1e771ba1b | Wesley Moore | 2019-11-28T04:20:59 | script: add enum option
This leans on the pre-existing enum support, which generates an
indexable list of strings and a sequence of sorted ranges. | diff --git a/src/app.rs b/src/app.rs
index 54d6625..38cf45d 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -214,6 +214,9 @@ pub fn app() -> App<'static, 'static> {
.arg(flag_name("SCRIPT"))
.arg(flag_chars.clone())
.arg(flag_trie_set.clone())
+ .arg(Arg::with_name("enum")
+ .lo... | 2 | 12 | 4 |
98e360ebd02327166fd0ed9da22354a23e8beccc | Andrew Gallant | 2020-01-04T16:01:31 | deps: update ucd-util | diff --git a/Cargo.lock b/Cargo.lock
index 3a0545a..8413a64 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -98,7 +98,7 @@ name = "regex-syntax"
version = "0.6.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "ucd-util 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
... | 1 | 5 | 5 |
faf428c6997b232d957f4048a88c0ed154bde881 | Andrew Gallant | 2019-07-21T13:26:41 | ucd-util-0.1.5 | diff --git a/ucd-util/Cargo.toml b/ucd-util/Cargo.toml
index 7322740..082a352 100644
--- a/ucd-util/Cargo.toml
+++ b/ucd-util/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ucd-util"
-version = "0.1.4" #:version
+version = "0.1.5" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
A small... | 1 | 1 | 1 |
2b96f677d6d0ff874be1b1b4bf634ce6480403f3 | Andrew Gallant | 2019-07-21T13:25:58 | ucd-util: fix handling of HANGUL JUNGSEONG O-E
Variations like `HANGUL JUNGSEONG O-E_` should still be normalized the
same as `HANGUL JUNGSEONG O-E`.
Fixes #12 | diff --git a/ucd-util/src/name.rs b/ucd-util/src/name.rs
index 93e798e..e83de4e 100644
--- a/ucd-util/src/name.rs
+++ b/ucd-util/src/name.rs
@@ -39,13 +39,18 @@ fn character_name_normalize_bytes(slice: &mut [u8]) -> &mut [u8] {
let medial = prev_letter
&& slice.get(i+1).map_or(false, |b| b... | 1 | 13 | 7 |
9b0f571ea2b1d61528d6738630515e6677027a72 | Andrew Gallant | 2019-07-21T02:50:21 | deps: update regex to 1.2.0
This brings in the Unicode 12.1.0 update from regex. ucd-generate relies
on this for its `dfa` and `regex` sub-commands.
See also #11. | diff --git a/Cargo.lock b/Cargo.lock
index 53f2a9c..ff919af 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -73,12 +73,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "regex"
-version = "1.1.9"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"... | 1 | 7 | 7 |
23f5c2746c0fbaab24f4d01558d3fa10de2f9277 | Andrew Gallant | 2019-07-21T02:18:54 | release: 0.2.2
Along with new releases for ucd-parse, ucd-trie and ucd-util. | diff --git a/Cargo.lock b/Cargo.lock
index 823d771..53f2a9c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -98,7 +98,7 @@ name = "regex-syntax"
version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
... | 5 | 17 | 17 |
aedf699c08716f410198bd815457dc53c2b1e5f4 | Andrew Gallant | 2019-07-21T01:46:01 | ucd-util: fix treatment of media hyphens
The implementation is slightly off. A medial hyphen only occurs when it
is between two letters, but we were implementing something subtly
different: a hyphen *wasn't* medial if it was surrounded by spaces. But
this neglects underscores and digits.
We also turn off the ellipsis... | diff --git a/ucd-util/src/lib.rs b/ucd-util/src/lib.rs
index 4dc5606..f5d45bc 100644
--- a/ucd-util/src/lib.rs
+++ b/ucd-util/src/lib.rs
@@ -10,6 +10,8 @@ be generated using `ucd-generate`.
*/
#![deny(missing_docs)]
+#![allow(unknown_lints)]
+#![allow(ellipsis_inclusive_range_patterns)]
mod hangul;
mod ideograp... | 2 | 11 | 5 |
a8410ad52e668589099f54588fae53f05b34d622 | Andrew Gallant | 2019-07-21T01:32:55 | chore: update dependencies and fix warnings
Various deprecation warnings have accumulated. We also update all
dependencies. | diff --git a/Cargo.lock b/Cargo.lock
index 1a7743c..823d771 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,9 +1,11 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
[[package]]
name = "aho-corasick"
-version = "0.6.9"
+version = "0.7.4"
source = "registry+https://github.... | 6 | 64 | 105 |
f5fc36414e0163898b2880be130bb3013493c619 | Andrew Gallant | 2019-07-21T01:30:20 | errors: improve failure modes when emoji-data.txt is missing
This commit improves the overall failure modes when I/O errors occur
while reading UCD data. In particular, the emoji-data.txt file is not
parse of the main UCD download, so we permit reading it to fail if it's
an I/O error.
Error messages should now includ... | diff --git a/src/property_bool.rs b/src/property_bool.rs
index 403f6a1..f47d363 100644
--- a/src/property_bool.rs
+++ b/src/property_bool.rs
@@ -79,7 +79,25 @@ fn parse_properties<P: AsRef<Path>>(
.extend(x.codepoints.into_iter().map(|c| c.value()));
}
- let emoji_prop: Vec<EmojiProperty> = ucd_p... | 4 | 60 | 39 |
b56d7f3f0c4e9a2a8c50023baa290a494191a0d5 | Andrew Gallant | 2019-01-12T22:48:26 | deps: bump ucd-parse | diff --git a/Cargo.lock b/Cargo.lock
index 0ba5a22..1a7743c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -163,14 +163,14 @@ dependencies = [
"fst 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex-automata 0.1.5 (regis... | 1 | 2 | 2 |
52606df0d5d52ddd7b347a0eb457ab71de13a691 | Andrew Gallant | 2019-01-12T22:47:48 | ucd-parse-0.1.3 | diff --git a/ucd-parse/Cargo.toml b/ucd-parse/Cargo.toml
index 7d26398..11d2282 100644
--- a/ucd-parse/Cargo.toml
+++ b/ucd-parse/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ucd-parse"
-version = "0.1.2" #:version
+version = "0.1.3" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
A ... | 1 | 1 | 1 |
555d8f39254596bac03942702bd39a6fca84232c | Andrew Gallant | 2019-01-12T22:47:41 | deps: update ucd-generate | diff --git a/Cargo.lock b/Cargo.lock
index bfea0ee..0ba5a22 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -156,7 +156,7 @@ dependencies = [
[[package]]
name = "ucd-generate"
-version = "0.2.0"
+version = "0.2.1"
dependencies = [
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.3... | 1 | 1 | 1 |
25e384ba6da1bd6557bff07df0e5311b5addafe2 | Andrew Gallant | 2019-01-10T01:53:04 | deps: bump regex-automata | diff --git a/Cargo.lock b/Cargo.lock
index 0a70781..bfea0ee 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -107,7 +107,7 @@ dependencies = [
[[package]]
name = "regex-automata"
-version = "0.1.3"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"byteorder 1.2.7 (... | 1 | 3 | 3 |
a08ade83f6f3ca6fe64de778c37d8f2ff56bcae2 | Andrew Gallant | 2019-01-10T01:51:12 | regex-automata: fix deserialization of dense DFAs
This fixes an issue when deserializing dense DFAs where it could fail if
the bytes weren't properly aligned. We fix this by applying a clever
trick to force the compiler to align the result of `include_bytes!` to
the amount we want.
Much thanks to @ExpHP for sharing t... | diff --git a/src/writer.rs b/src/writer.rs
index 1513a08..00bbdc6 100644
--- a/src/writer.rs
+++ b/src/writer.rs
@@ -710,14 +710,14 @@ impl Writer {
}
writeln!(self.wtr, "#[cfg(target_endian = \"big\")]")?;
self.write_regex_static(
- const_name, &ty, "DenseDFA", &fname_fwd_be, &fna... | 1 | 34 | 16 |
37be69a70f742951dbcc3dbc97281d34d4184567 | Andrew Gallant | 2019-01-06T16:22:31 | deps: bump regex-automata to 0.1.3
This brings in a bug fix for minimized DFAs. | diff --git a/Cargo.lock b/Cargo.lock
index fd34d10..0a70781 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -107,7 +107,7 @@ dependencies = [
[[package]]
name = "regex-automata"
-version = "0.1.2"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"byteorder 1.2.7 (... | 2 | 4 | 4 |
3e4b0cd8d5db864e92bae3e417d36ab9673d7f07 | Andrew Gallant | 2019-01-06T15:33:37 | writer: use trim_end instead of trim_right | diff --git a/src/writer.rs b/src/writer.rs
index 0ce097e..1513a08 100644
--- a/src/writer.rs
+++ b/src/writer.rs
@@ -1004,7 +1004,7 @@ impl<W: io::Write> LineWriter<W> {
if self.line.is_empty() {
return Ok(());
}
- self.wtr.write_all(self.line.trim_right().as_bytes())?;
+ se... | 1 | 1 | 1 |
6e98381c0ef179c2870d577b2f6f4ca500baa97b | Andrew Gallant | 2019-01-04T03:01:52 | ucd-parse-0.1.2 | diff --git a/ucd-parse/Cargo.toml b/ucd-parse/Cargo.toml
index 53073aa..7d26398 100644
--- a/ucd-parse/Cargo.toml
+++ b/ucd-parse/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ucd-parse"
-version = "0.1.1" #:version
+version = "0.1.2" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
A ... | 1 | 1 | 1 |
3b81b1dcff5a6b9798fc87ae9cf722ae4dee279c | Andrew Gallant | 2019-01-04T02:54:42 | deps: bump regex-automata | diff --git a/Cargo.lock b/Cargo.lock
index 9ce2af9..1f6b17d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -107,7 +107,8 @@ dependencies = [
[[package]]
name = "regex-automata"
-version = "0.0.1"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"byteorder 1.2.7 (... | 1 | 4 | 2 |
d27efb57e98719ddb8e1784cb5f9af05e6a1f2c2 | Kornel | 2019-01-02T14:29:08 | misc: add categories to Cargo.toml | diff --git a/Cargo.toml b/Cargo.toml
index df6c903..4c93990 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,6 +12,7 @@ repository = "https://github.com/BurntSushi/ucd-generate"
readme = "README.md"
keywords = ["unicode", "generate", "character", "table", "fst"]
license = "MIT/Apache-2.0"
+categories = ["text-process... | 1 | 1 | 0 |
e9e86595650593a5d204a48082a2edca12d0abf5 | Andrew Gallant | 2018-12-04T00:02:57 | ucd-parse: fix for Rust 1.24.1 | diff --git a/ucd-parse/src/common.rs b/ucd-parse/src/common.rs
index 970d18f..5d5464d 100644
--- a/ucd-parse/src/common.rs
+++ b/ucd-parse/src/common.rs
@@ -147,7 +147,7 @@ pub fn parse_break_test(line: &str) -> Result<(Vec<String>, String), Error> {
let ch = match cp.scalar() {
Some(ch) => ch,
... | 1 | 1 | 1 |
323c7bc7daba467930af816283c8b4e260d9957a | Andrew Gallant | 2018-11-26T13:44:40 | ucd-parse: add break tests
This commit adds support for parsing grapheme cluster, word, sentence and
line break tests.
ucd-generate does not do anything with them at the moment, as it's easy
enough to drop the data file into tests and just parse them on the fly. | diff --git a/ucd-parse/src/common.rs b/ucd-parse/src/common.rs
index 5049dee..970d18f 100644
--- a/ucd-parse/src/common.rs
+++ b/ucd-parse/src/common.rs
@@ -108,6 +108,57 @@ pub fn parse_codepoint_sequence(s: &str) -> Result<Vec<Codepoint>, Error> {
Ok(cps)
}
+/// A helper function for parsing a single test for... | 6 | 244 | 9 |
f23cdf734c69c4ec772506e3599930ef810e4164 | Andrew Gallant | 2018-11-22T00:22:48 | ucd: add Word_Break and Sentence_Break properties
This is basically copying the code for handling Grapheme_Cluster_Break.
We probably could have applied DRY here, but oh well. | diff --git a/src/app.rs b/src/app.rs
index b338f46..4523662 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -125,6 +125,16 @@ grapheme-cluster-break emits the table of property values and their
corresponding codepoints for the Grapheme_Cluster_Break property.
";
+const ABOUT_WORD_BREAK: &'static str = "\
+word-break em... | 7 | 256 | 32 |
e472a537e6ab1021545b013895c4fd9618e5b63c | Andrew Gallant | 2018-11-21T02:05:16 | ucd-generate: add Grapheme_Cluster_Break support
This commit adds a new command, grapheme-cluster-break, which emits the
Grapheme_Cluster_Break enumeration property. By default, a table is
emitted for each possible value of the property, but it supports the same
output options as the general-category command. | diff --git a/src/app.rs b/src/app.rs
index 4fa40b3..b338f46 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -120,6 +120,11 @@ to codepoint. When codepoints are mapped according to this table, then case
differences (according to Unicode) are eliminated.
";
+const ABOUT_GRAPHEME_CLUSTER_BREAK: &'static str = "\
+grapheme... | 5 | 119 | 0 |
3f4f387bd6da1efb4863ec6ee63816fd09db1dec | Andrew Gallant | 2018-11-21T02:01:55 | ucd-generate: add Emoji support
This commit adds support for the emoji properies such as Emoji and
Extended_Pictographic. No new command is created. Instead, we simply
incorporate them into the standard boolean property command. | diff --git a/src/property_bool.rs b/src/property_bool.rs
index 07b9e9a..403f6a1 100644
--- a/src/property_bool.rs
+++ b/src/property_bool.rs
@@ -1,7 +1,9 @@
use std::collections::{BTreeMap, BTreeSet};
use std::path::Path;
-use ucd_parse::{self, CoreProperty, Property, UnicodeDataExpander};
+use ucd_parse::{
+ se... | 4 | 102 | 5 |
beb53ccea75be0e51d47d4a477d7f748239a69ec | Andrew Gallant | 2018-11-21T00:35:52 | deps: update dependencies | diff --git a/Cargo.lock b/Cargo.lock
index a3318db..5502c7f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,9 +1,9 @@
[[package]]
name = "aho-corasick"
-version = "0.6.4"
+version = "0.6.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "memchr 2.0.1 (registry+https://github.com/... | 1 | 79 | 72 |
20eb1c88b5b6c6c2c275e496102a8bd7857f423b | Andrew Gallant | 2018-11-16T16:38:15 | deps: updated ucd-util | diff --git a/Cargo.lock b/Cargo.lock
index 1d78e39..a3318db 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -145,7 +145,7 @@ dependencies = [
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ucd-parse 0.1.1",
"ucd-trie 0.1.1",
- "ucd-util 0.1.2",
+ "ucd-util 0.1.3",
]
[[package]]
@@ -... | 1 | 2 | 2 |
22beb628882e699882620abb8de90eb637473341 | Andrew Gallant | 2018-11-16T16:31:22 | ucd-util-0.1.3 | diff --git a/ucd-util/Cargo.toml b/ucd-util/Cargo.toml
index 98ecbdf..b9e4f26 100644
--- a/ucd-util/Cargo.toml
+++ b/ucd-util/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ucd-util"
-version = "0.1.2" #:version
+version = "0.1.3" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
A small... | 1 | 1 | 1 |
aad4fbf8e4c53dbe0b4e0063e516b731cfbd587f | Andrew Gallant | 2018-10-29T16:07:58 | deps: update to ucd-util 0.1.2 | diff --git a/Cargo.lock b/Cargo.lock
index 548c996..1d78e39 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -145,7 +145,7 @@ dependencies = [
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ucd-parse 0.1.1",
"ucd-trie 0.1.1",
- "ucd-util 0.1.1",
+ "ucd-util 0.1.2",
]
[[package]]
@@ -... | 2 | 3 | 3 |
bbd9ad59c7d83e68f3da371aab79793ff4e58911 | Andrew Gallant | 2018-10-29T14:58:50 | ucd-util-0.1.2 | diff --git a/ucd-util/Cargo.toml b/ucd-util/Cargo.toml
index f96d96e..98ecbdf 100644
--- a/ucd-util/Cargo.toml
+++ b/ucd-util/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ucd-util"
-version = "0.1.1" #:version
+version = "0.1.2" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
A small... | 1 | 1 | 1 |
b56b0844374b27d327f9cabd0f54c69f3efbb3a5 | Josh Stone | 2018-06-12T10:56:52 | crates.io: update repo and home links, and use docs.rs | diff --git a/ucd-parse/Cargo.toml b/ucd-parse/Cargo.toml
index af7d227..7001e3b 100644
--- a/ucd-parse/Cargo.toml
+++ b/ucd-parse/Cargo.toml
@@ -5,9 +5,9 @@ authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
A library for parsing data files in the Unicode character database.
"""
-documentation = "htt... | 3 | 8 | 8 |
e39d343a0b18067287470bcbb3e48d17ebf487ed | Christopher Durham | 2018-06-02T12:27:19 | doc: replace rucd references | diff --git a/Cargo.toml b/Cargo.toml
index dae23c4..f33be7b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,9 +6,9 @@ description = """
A program for generating packed representations of the Unicode character
database that can be efficiently searched.
"""
-documentation = "https://github.com/BurntSushi/rucd"
-homepag... | 1 | 3 | 3 |
523bd209827cea36dc7573d3ff968c3ccf059afd | Andrew Gallant | 2018-04-28T14:43:01 | ucd-util: fix canonicalization of 'isc'
This commit fixes a bug where 'isc' was canonicalized to 'c'. 'isc' is an
alias for 'ISO_Comment', but the 'is' prefix was being dropped since
canonicalization permits ignoring 'is' prefixes when designating property
names.
This is the root cause of a bug in the regex library:
... | diff --git a/ucd-util/src/name.rs b/ucd-util/src/name.rs
index 634d2ed..20c2f4b 100644
--- a/ucd-util/src/name.rs
+++ b/ucd-util/src/name.rs
@@ -94,9 +94,10 @@ fn symbolic_name_normalize_bytes(slice: &mut [u8]) -> &mut [u8] {
// names/aliases had a particular structure (unlike character names), but
// we assu... | 1 | 15 | 1 |
7a5cd628e682518d20f10a7091a6d70d3bfa639a | Andrew Gallant | 2018-04-28T14:41:05 | ucd-parse: add test case for ISO_Comment
This checks that we are parsing the ISO_Comment alias correctly. This
test never failed, but was part of debugging a bug related to 'c' being
incorrectly assigned as an alias to the ISO_Comment. | diff --git a/ucd-parse/src/property_aliases.rs b/ucd-parse/src/property_aliases.rs
index dc31b1c..d2ffa38 100644
--- a/ucd-parse/src/property_aliases.rs
+++ b/ucd-parse/src/property_aliases.rs
@@ -99,4 +99,13 @@ mod tests {
assert_eq!(row.long, "kRSUnicode");
assert_eq!(row.aliases, vec!["Unicode_Radi... | 1 | 9 | 0 |
82337f148f5749f4697d040e20cdc051247cb0e1 | Andrew Gallant | 2018-04-28T14:40:16 | ucd-generate: permit deprecated use of AsciiExt | diff --git a/src/writer.rs b/src/writer.rs
index 2dc975b..98846e1 100644
--- a/src/writer.rs
+++ b/src/writer.rs
@@ -836,7 +836,7 @@ fn escape_input(b: u8) -> String {
/// Heuristically produce an appropriate constant Rust name.
fn rust_const_name(s: &str) -> String {
- #[allow(unused_imports)]
+ #[allow(depr... | 1 | 2 | 2 |
38ce815237c9dc935044de7de190ef39df7779f5 | Andrew Gallant | 2018-03-06T12:20:29 | deps: bump sub-crates | diff --git a/Cargo.lock b/Cargo.lock
index f9b8b34..548c996 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -137,20 +137,20 @@ dependencies = [
[[package]]
name = "ucd-generate"
-version = "0.0.1"
+version = "0.1.1"
dependencies = [
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2... | 2 | 11 | 11 |
b822ea7792ff16229572f87142a8ada7c50bda67 | Andrew Gallant | 2018-03-06T12:18:56 | ucd-parse-0.1.1 | diff --git a/ucd-parse/Cargo.toml b/ucd-parse/Cargo.toml
index f0a254c..af7d227 100644
--- a/ucd-parse/Cargo.toml
+++ b/ucd-parse/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ucd-parse"
-version = "0.1.0" #:version
+version = "0.1.1" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
A ... | 1 | 1 | 1 |
786862b55b6269c1dda3e755f668d7438ed4a8c8 | Andrew Gallant | 2018-03-06T12:18:42 | ucd-trie-0.1.1 | diff --git a/ucd-trie/Cargo.toml b/ucd-trie/Cargo.toml
index 05f4879..b4ba3ac 100644
--- a/ucd-trie/Cargo.toml
+++ b/ucd-trie/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ucd-trie"
-version = "0.1.0" #:version
+version = "0.1.1" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
A trie ... | 1 | 1 | 1 |
781b980a1c94632fc1451728c9d3fb4a001446b7 | Andrew Gallant | 2018-03-06T12:18:33 | ucd-util-0.1.1 | diff --git a/ucd-util/Cargo.toml b/ucd-util/Cargo.toml
index 1eb203e..ee41ece 100644
--- a/ucd-util/Cargo.toml
+++ b/ucd-util/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ucd-util"
-version = "0.1.0" #:version
+version = "0.1.1" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
A small... | 1 | 1 | 1 |
59b9120b8d0c496f16fe3443a1c746f4329cd3ff | Andrew Gallant | 2018-03-06T02:32:10 | deps: update sub-crates (and clap) | diff --git a/Cargo.lock b/Cargo.lock
index d58fe5d..f9b8b34 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8,8 +8,11 @@ dependencies = [
[[package]]
name = "ansi_term"
-version = "0.10.2"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi 0.3.4 (registry+... | 2 | 18 | 15 |
c8270b21be67f7990501f21e6a43458dbc9eb928 | Andrew Gallant | 2018-03-06T02:30:37 | ucd-trie-0.1.0 | diff --git a/ucd-trie/Cargo.toml b/ucd-trie/Cargo.toml
index 828df76..6bf19c9 100644
--- a/ucd-trie/Cargo.toml
+++ b/ucd-trie/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ucd-trie"
-version = "0.0.1" #:version
+version = "0.1.0" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
A trie ... | 1 | 1 | 1 |
5bf4eb43398cf87a0a55b7342dbfa94cebf36a83 | Andrew Gallant | 2018-03-06T02:30:21 | ucd-util-0.1.0 | diff --git a/ucd-util/Cargo.toml b/ucd-util/Cargo.toml
index 4dbec30..8c13a4a 100644
--- a/ucd-util/Cargo.toml
+++ b/ucd-util/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ucd-util"
-version = "0.0.1" #:version
+version = "0.1.0" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
A small... | 1 | 1 | 1 |
ea24a438a6871ba5f0cf6ba22e9048d5c42cbc4c | Andrew Gallant | 2018-03-06T02:29:57 | ucd-parse-0.1.0 | diff --git a/ucd-parse/Cargo.toml b/ucd-parse/Cargo.toml
index ea31e3b..b911cef 100644
--- a/ucd-parse/Cargo.toml
+++ b/ucd-parse/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ucd-parse"
-version = "0.0.1" #:version
+version = "0.1.0" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
A ... | 1 | 1 | 1 |
66f85e49bce479f46561220ae028f64fcac2050a | Andrew Gallant | 2018-03-06T02:27:05 | deps: remove regex
The main ucd-generate tool apparently doesn't need it. | diff --git a/Cargo.lock b/Cargo.lock
index e490821..d58fe5d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -140,7 +140,6 @@ dependencies = [
"clap 2.30.0 (registry+https://github.com/rust-lang/crates.io-index)",
"fst 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https:/... | 2 | 0 | 2 |
5ff671bb217f64e894261d70c971582596d954c7 | Andrew Gallant | 2018-03-06T02:17:14 | compat: remove trailing commas
This is to support Rust 1.12.0 for ucd-util only. | diff --git a/ucd-util/src/property.rs b/ucd-util/src/property.rs
index 28e25d1..7bbe56e 100644
--- a/ucd-util/src/property.rs
+++ b/ucd-util/src/property.rs
@@ -95,16 +95,13 @@ mod tests {
fn canonical_property_name_1() {
assert_eq!(
canonical_property_name(PROPERTY_NAMES, "gc"),
- ... | 1 | 4 | 8 |
9f39918876ebbba529b46cf3e27df0eb1f5c47d8 | David Aguilar | 2025-12-16T18:57:29 | tests: fix clippy warnings | diff --git a/tests/yaml-test-suite.rs b/tests/yaml-test-suite.rs
index ff311ba..76ef867 100644
--- a/tests/yaml-test-suite.rs
+++ b/tests/yaml-test-suite.rs
@@ -277,8 +277,7 @@ fn expected_events(expected_tree: &str) -> Vec<String> {
let idx = anchors
.iter()
.... | 1 | 1 | 2 |
635ffd17f2bf3c095c8881b53441a7c3d968775f | David Aguilar | 2025-12-16T05:25:51 | Release v0.11.0. | diff --git a/Cargo.lock b/Cargo.lock
index 5a4f80d..ec4d3e0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -355,7 +355,7 @@ dependencies = [
[[package]]
name = "yaml-rust2"
-version = "0.10.4"
+version = "0.11.0"
dependencies = [
"arraydeque",
"encoding_rs",
diff --git a/Cargo.toml b/Cargo.toml
index cf031ef..9e2... | 2 | 2 | 2 |
390d176cd8c7c10beb6621656ca27e24778c5c40 | David Aguilar | 2025-12-16T05:13:24 | cargo: update dependencies | diff --git a/Cargo.lock b/Cargo.lock
index 8998df6..5a4f80d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,18 +4,18 @@ version = 3
[[package]]
name = "aho-corasick"
-version = "1.1.3"
+version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e60d3430d3a69478ad0993f19238d2df9... | 1 | 55 | 113 |
f6aac3ede5488138e1ce80ca6a9a923b0e82b282 | Guillermo Lorenzo | 2025-11-25T14:12:20 | fix clippy checks | diff --git a/src/parser.rs b/src/parser.rs
index d73ea1d..24a5529 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -579,7 +579,7 @@ impl<T: Iterator<Item = char>> Parser<T> {
if tags.contains_key(handle) {
return Err(ScanError::new(*mark, "the TAG directive must only be gi... | 1 | 4 | 4 |
e92169f04d3c5d70302ebbb6c7e0f2b99b7f4a14 | Guillermo Lorenzo | 2025-11-25T14:04:25 | fix clippy checks | diff --git a/src/parser.rs b/src/parser.rs
index c4cb9fc..d73ea1d 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -579,7 +579,7 @@ impl<T: Iterator<Item = char>> Parser<T> {
if tags.contains_key(handle) {
return Err(ScanError::new(*mark, "the TAG directive must only be gi... | 1 | 4 | 4 |
2b3cf9dfe7e040f4584e0525733b4c436321e9ac | Guillermo Lorenzo | 2025-11-25T13:56:27 | fix clippy checks | diff --git a/src/parser.rs b/src/parser.rs
index d856497..c4cb9fc 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -579,7 +579,7 @@ impl<T: Iterator<Item = char>> Parser<T> {
if tags.contains_key(handle) {
return Err(ScanError::new(*mark, "the TAG directive must only be gi... | 1 | 4 | 4 |
223f52824a3eb498e7c2cd4ce4ff0e21f5ae8fbf | Guillermo Lorenzo | 2025-11-25T13:46:23 | set hashlink to 0.11.0 | diff --git a/Cargo.lock b/Cargo.lock
index 1b859ff..8998df6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -146,9 +146,9 @@ checksum = "5692dd7b5a1978a5aeb0ce83b7655c58ca8efdcb79d21036ea249da95afec2c6"
[[package]]
name = "foldhash"
-version = "0.1.5"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/... | 2 | 7 | 7 |
f7a45c677b366de1bc85a86d094ce6a457494b2a | Ethiraric | 2025-09-14T21:33:28 | Set tools as examples.
This avoids them being `cargo install`able. | diff --git a/Cargo.toml b/Cargo.toml
index 736e1d0..d5ca31e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -43,14 +43,14 @@ lto = true
name = "yaml-test-suite"
harness = false
-[[bin]]
+[[example]]
name = "dump_events"
path = "tools/dump_events.rs"
-[[bin]]
+[[example]]
name = "time_parse"
path = "tools/time_par... | 1 | 3 | 3 |
399f481990f11120b144ccd550657580284a3a30 | Cristian Le | 2025-06-06T04:07:38 | Bump libtest-mimic to 0.8.1 | diff --git a/Cargo.lock b/Cargo.lock
index 7222b29..2c971bc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -12,118 +12,112 @@ dependencies = [
]
[[package]]
-name = "arraydeque"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1... | 3 | 111 | 232 |
143478adc6cfc8bf19ea71e846aefdc7e7d70cd7 | David Aguilar | 2025-04-26T08:48:27 | api: lower MSRV to Rust 1.65
Resolves: #20 | diff --git a/Cargo.toml b/Cargo.toml
index dbe0de6..e724a4f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,7 +12,7 @@ description = "A fully YAML 1.2 compliant YAML parser"
repository = "https://github.com/Ethiraric/yaml-rust2"
readme = "README.md"
edition = "2021"
-rust-version = "1.70.0"
+rust-version = "1.65.0"
... | 4 | 22 | 4 |
20e9a76143a5c6598f9063668851bedcbcabe105 | fennewald | 2025-04-15T09:21:22 | Fix lints. | diff --git a/src/yaml.rs b/src/yaml.rs
index 3968f58..3f4d117 100644
--- a/src/yaml.rs
+++ b/src/yaml.rs
@@ -70,7 +70,7 @@ fn parse_f64(v: &str) -> Option<f64> {
".nan" | ".NaN" | ".NAN" => Some(f64::NAN),
// Test that `v` contains a digit so as not to pass in strings like `inf`,
// which rus... | 2 | 12 | 9 |
68770e1509c86330692914d4bbc947c311f3ea3e | Ethiraric | 2025-04-11T19:21:09 | Stop renovabot from tripping? | diff --git a/Cargo.lock b/Cargo.lock
index cc22e8f..6c5d600 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -528,7 +528,7 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "yaml-rust2"
-version = "0.10.0"
+version = "0.10.1"
dependencies = [
"arraydeque",
"encoding... | 3 | 411 | 1 |
85f0c1a7d47b4b2ee2a82babc0933b614ee5afeb | Ethiraric | 2025-04-11T19:15:02 | Please the CI gods. | diff --git a/tests/yaml-test-suite.rs b/tests/yaml-test-suite.rs
index 4d402f4..b6ba801 100644
--- a/tests/yaml-test-suite.rs
+++ b/tests/yaml-test-suite.rs
@@ -147,12 +147,12 @@ impl EventReceiver for EventReporter {
Event::DocumentEnd => "-DOC".into(),
Event::SequenceStart(idx, tag) => {
-... | 1 | 5 | 5 |
bb9255180680d4590d962a957953d5bc1a4b556e | Ethiraric | 2025-02-11T16:46:11 | Fix clippy warnings. | diff --git a/src/emitter.rs b/src/emitter.rs
index 04ffa61..ca55446 100644
--- a/src/emitter.rs
+++ b/src/emitter.rs
@@ -124,7 +124,7 @@ fn escape_str(wr: &mut dyn fmt::Write, v: &str) -> Result<(), fmt::Error> {
impl<'a> YamlEmitter<'a> {
/// Create a new emitter serializing into `writer`.
- pub fn new(writ... | 2 | 3 | 3 |
953d0ae9e7215155058516173fb49da349015edc | Ethiraric | 2024-09-13T18:55:40 | Add some links in doccomments. | diff --git a/src/yaml.rs b/src/yaml.rs
index db2764b..733bdc1 100644
--- a/src/yaml.rs
+++ b/src/yaml.rs
@@ -40,9 +40,9 @@ pub enum Yaml {
String(String),
/// YAML bool, e.g. `true` or `false`.
Boolean(bool),
- /// YAML array, can be accessed as a `Vec`.
+ /// YAML array, can be accessed as a [`Vec... | 1 | 2 | 2 |
9a22d39495c0e86a91839a29765898f746698559 | Ethiraric | 2024-07-14T14:46:45 | Update dependencies. | diff --git a/Cargo.toml b/Cargo.toml
index 22dfd18..0a4c251 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,10 +22,10 @@ encoding = [ "dep:encoding_rs" ]
[dependencies]
arraydeque = "0.5.1"
encoding_rs = { version = "0.8.33", optional = true }
-hashlink = "0.8"
+hashlink = ">= 0.8, < 0.10"
[dev-dependencies]
-lib... | 1 | 2 | 2 |
f76e29779d7c8fc3ce8d0260e8367326a02b09f3 | Ethiraric | 2024-07-07T17:31:36 | Minor style improvements. | diff --git a/src/emitter.rs b/src/emitter.rs
index c98814e..8b9a0be 100644
--- a/src/emitter.rs
+++ b/src/emitter.rs
@@ -253,9 +253,9 @@ impl<'a> YamlEmitter<'a> {
fn emit_literal_block(&mut self, v: &str) -> EmitResult {
let ends_with_newline = v.ends_with('\n');
if ends_with_newline {
- ... | 1 | 3 | 3 |
894c06b04260f0dbc4dbc1624355a82ea0396fe0 | Chris Gunn | 2024-07-04T18:52:14 | Fix multiline string emit.
Use `|-` instead of `|` when there is not a trailing newline
in the string value. | diff --git a/src/emitter.rs b/src/emitter.rs
index 48c8b5c..c98814e 100644
--- a/src/emitter.rs
+++ b/src/emitter.rs
@@ -169,7 +169,7 @@ impl<'a> YamlEmitter<'a> {
/// emitter.dump(&parsed[0]).unwrap();
/// assert_eq!(output.as_str(), "\
/// ---
- /// foo: |
+ /// foo: |-
/// bar!
/// ... | 2 | 59 | 10 |
9c135773bf0b27691cc0f234a2a2b63037723c12 | Ethiraric | 2024-06-23T18:54:03 | Fix rustc complaining about indentation. | diff --git a/src/scanner.rs b/src/scanner.rs
index b61ee5e..7156b0b 100644
--- a/src/scanner.rs
+++ b/src/scanner.rs
@@ -318,6 +318,7 @@ struct Indent {
/// consume/push a character. As of now, almost all lookaheads are 4 characters maximum, except:
/// - Escape sequences parsing: some escape codes are 8 characters... | 1 | 1 | 0 |
59415ecad09e7f5149dff24c9b2003318ad5d092 | Ethiraric | 2024-05-31T15:18:14 | Fix new warnings with newer clippy. | diff --git a/src/parser.rs b/src/parser.rs
index 59869a2..973717f 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -57,7 +57,7 @@ pub enum Event {
/// The anchor ID the alias refers to.
usize,
),
- /// Value, style, anchor_id, tag
+ /// Value, style, anchor id, tag
Scalar(String, TSca... | 4 | 5 | 5 |
9f56534be271fc12a9d221bf0766ee3214d6503a | Ethiraric | 2024-05-31T15:05:26 | Fix issue with deeply indented block scalars.
Fixes #29. | diff --git a/src/scanner.rs b/src/scanner.rs
index cdfbcfc..3e5096b 100644
--- a/src/scanner.rs
+++ b/src/scanner.rs
@@ -1800,7 +1800,10 @@ impl<T: Iterator<Item = char>> Scanner<T> {
while !self.buffer.is_empty() && self.mark.col < indent && self.ch() == ' ' {
self.skip_bl... | 2 | 28 | 1 |
0eb7936e1e85553031dbcb99fa8837be3484c2ee | Ethiraric | 2024-04-16T09:35:08 | Fix error with comments after tags. | diff --git a/src/scanner.rs b/src/scanner.rs
index 017e045..cdfbcfc 100644
--- a/src/scanner.rs
+++ b/src/scanner.rs
@@ -511,7 +511,7 @@ impl<T: Iterator<Item = char>> Scanner<T> {
/// Consume a linebreak (either CR, LF or CRLF), if any. Do nothing if there's none.
#[inline]
- fn skip_line(&mut self) {
+... | 2 | 26 | 17 |
0b42882f8d31f779dec247d301767019913ee69d | Ethiraric | 2024-04-06T23:40:02 | Remove unneeded dependency. | diff --git a/tools/gen_large_yaml/Cargo.toml b/tools/gen_large_yaml/Cargo.toml
index d57bdea..d8526fb 100644
--- a/tools/gen_large_yaml/Cargo.toml
+++ b/tools/gen_large_yaml/Cargo.toml
@@ -11,7 +11,6 @@ readme = "README.md"
edition = "2018"
[dependencies]
-yaml-rust2 = { path = "../.." }
rand = { version = "0.8.5"... | 1 | 0 | 1 |
644af6a27c9f7039a0adaa5cfdb52a97754b69dd | Ethiraric | 2024-04-06T23:39:51 | Disallow duplicate keys in mappings.
Fixes #23. | diff --git a/src/scanner.rs b/src/scanner.rs
index dece35b..017e045 100644
--- a/src/scanner.rs
+++ b/src/scanner.rs
@@ -95,6 +95,12 @@ impl ScanError {
}
}
+ /// Create a new error from a location and an error string.
+ #[must_use]
+ pub fn new_string(loc: Marker, info: String) -> ScanError {
... | 4 | 66 | 29 |
0a637955ced8726a528e93a1ed2ede50c62bbb0e | Ethiraric | 2024-03-30T18:39:53 | Messed up the MSRV. | diff --git a/Cargo.toml b/Cargo.toml
index f4756c1..6eb3390 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,7 +12,7 @@ description = "A fully YAML 1.2 compliant YAML parser"
repository = "https://github.com/Ethiraric/yaml-rust2"
readme = "README.md"
edition = "2021"
-rust-version = "1.65.0"
+rust-version = "1.70.0"
... | 2 | 5 | 3 |
6756e50f867ba2c581f2509e017952a03f3a28be | David Aguilar | 2024-03-24T21:51:15 | parser: add Parser::new_from_str(&str) | diff --git a/src/parser.rs b/src/parser.rs
index 0b33e58..c5855a8 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -182,7 +182,7 @@ pub struct Parser<T> {
/// /// Load events from a yaml string.
/// fn str_to_events(yaml: &str) -> Vec<Event> {
/// let mut sink = EventSink { events: Vec::new() };
-/// let mu... | 6 | 16 | 8 |
78d7bca3c8c003a409571011ba05738936e49f12 | David Aguilar | 2024-03-24T22:01:38 | parser: fixup typos from github | diff --git a/src/parser.rs b/src/parser.rs
index 52aca1b..0b33e58 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -1127,7 +1127,7 @@ baz: "qux"
let yaml = &loader.documents()[1];
assert_eq!(yaml["baz"].as_str(), Some("qux"));
- let mut loader = YamlLoader::default()
+ let mut loader ... | 1 | 1 | 1 |
429a682f3e67eed4de15420eb7587ac9a07a0843 | David Aguilar | 2024-03-24T21:15:37 | parser: add a test for `keep_tags(false)`
Co-authored-by: Ethiraric <ethiraric@gmail.com> | diff --git a/src/parser.rs b/src/parser.rs
index ba595d0..52aca1b 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -1126,5 +1126,9 @@ baz: "qux"
assert_eq!(yaml["foo"].as_str(), Some("bar"));
let yaml = &loader.documents()[1];
assert_eq!(yaml["baz"].as_str(), Some("qux"));
+
+ let mut... | 1 | 4 | 0 |
da93547f611b82dad5edde5e0037ba3108f57dcf | David Aguilar | 2024-03-24T21:15:09 | parser: better document `keep_tags`
Co-authored-by: Ethiraric <ethiraric@gmail.com> | diff --git a/src/parser.rs b/src/parser.rs
index 1aacfdb..ba595d0 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -228,7 +228,28 @@ impl<T: Iterator<Item = char>> Parser<T> {
}
}
- /// Make tags persistent when parsing multiple documents.
+ /// Whether to keep tags across multiple documents when... | 1 | 22 | 1 |
8cf222618f7c3340050aad350b667322fa1d24f7 | David Aguilar | 2024-03-24T05:31:57 | parser: add an option to keep tags across multiple documents
Documents are self-contained and tags defined in the first document are not
visible to subsequent documents.
Add support for having tags that span across all documents by making the
clearing of tags in the parser opt-out.
Closes: #10 | diff --git a/src/parser.rs b/src/parser.rs
index b834c38..1aacfdb 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -115,6 +115,8 @@ pub struct Parser<T> {
///
/// Key is the handle, and value is the prefix.
tags: HashMap<String, String>,
+ /// Make tags global across all documents.
+ keep_tags: bo... | 1 | 34 | 1 |
1c973cb03333716c4f01931b9efbb817c0b4537f | David Aguilar | 2024-03-24T05:42:58 | yaml: add YamlLoader::documents() to get a read-only view of the parsed documents | diff --git a/src/yaml.rs b/src/yaml.rs
index 2ef4376..b869fcc 100644
--- a/src/yaml.rs
+++ b/src/yaml.rs
@@ -239,6 +239,12 @@ impl YamlLoader {
parser.load(&mut loader, true)?;
Ok(loader.docs)
}
+
+ /// Return a reference to the parsed Yaml documents.
+ #[must_use]
+ pub fn documents(&se... | 1 | 6 | 0 |
3212a1db520e9fd224c97ac02c126a189444b75d | Ethiraric | 2024-03-20T22:07:08 | Make `gen_large_yaml` reproductible.
* Use a seedable RNG so that we can have the same number sequence.
* Replace `HashMap`s with `Vec`s to avoid undeterministic iteration. | diff --git a/tools/gen_large_yaml/Cargo.toml b/tools/gen_large_yaml/Cargo.toml
index 750a4c4..a70e779 100644
--- a/tools/gen_large_yaml/Cargo.toml
+++ b/tools/gen_large_yaml/Cargo.toml
@@ -12,7 +12,7 @@ edition = "2018"
[dependencies]
yaml-rust2 = { version = "0.7.0", path = "../../" }
-rand = "0.8.5"
+rand = { ver... | 4 | 91 | 82 |
ae4cffa649c3a9a99d096fef9419d6fd01623425 | Ethiraric | 2024-03-20T14:54:09 | Fix rustdoc ignore directive. | diff --git a/src/char_traits.rs b/src/char_traits.rs
index a48d4db..82f81bd 100644
--- a/src/char_traits.rs
+++ b/src/char_traits.rs
@@ -112,7 +112,7 @@ pub(crate) fn is_tag_char(c: char) -> bool {
/// Check if the string can be expressed a valid literal block scalar.
/// The YAML spec supports all of the following... | 1 | 1 | 1 |
e0c25b3c3a4ddc665a2384d526ae1f8ee3bf70c1 | Ethiraric | 2024-03-20T14:45:24 | Forgot to bump some v0.6.0 to v0.7.0. | diff --git a/src/lib.rs b/src/lib.rs
index 4428f5a..a6e49b5 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -11,7 +11,7 @@
//!
//! ```toml
//! [dependencies]
-//! yaml-rust2 = "0.6.0"
+//! yaml-rust2 = "0.7.0"
//! ```
//!
//! # Examples
diff --git a/tools/gen_large_yaml/Cargo.toml b/tools/gen_large_yaml/Cargo.toml
in... | 2 | 2 | 2 |
6341ffccc443893b906b4a686f7d74465040e707 | Ethiraric | 2024-03-20T13:42:31 | Update cargo version to 0.7. | diff --git a/Cargo.toml b/Cargo.toml
index 07da692..bf96f58 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "yaml-rust2"
-version = "0.6.0"
+version = "0.7.0"
authors = [
"Yuheng Chen <yuhengchen@sensetime.com>",
"Ethiraric <ethiraric@gmail.com>", | 1 | 1 | 1 |
570f8e25bc378e5f42858f02a5b225a66dee431f | Ethiraric | 2024-03-19T17:18:59 | Re-enable clippy warnings. | diff --git a/src/char_traits.rs b/src/char_traits.rs
index 5965cc4..a48d4db 100644
--- a/src/char_traits.rs
+++ b/src/char_traits.rs
@@ -111,9 +111,9 @@ pub(crate) fn is_tag_char(c: char) -> bool {
}
/// Check if the string can be expressed a valid literal block scalar.
-/// The YAML spec supports all of the follow... | 3 | 12 | 3 |
77e8fe79208839e9a4d7fa994d728929b92a3611 | David Aguilar | 2024-03-17T10:22:15 | Enable all clippy warnings
Rename Scanner::next() to Scanner::next_token() to avoid
confusiong with the Iterator trait. | diff --git a/src/lib.rs b/src/lib.rs
index 0651aea..e95e452 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -30,9 +30,6 @@
//!
//! ```
-#![cfg_attr(feature = "cargo-clippy", warn(clippy::pedantic))]
-#![cfg_attr(feature = "cargo-clippy", allow(clippy::should_implement_trait))]
-
extern crate hashlink;
pub(crate) mo... | 2 | 12 | 15 |
dac13ef88ea3fb49b8301a22bac08f17dc7f419f | David Aguilar | 2024-03-17T10:15:56 | Enable the missing-errors-doc clippy checks | diff --git a/src/emitter.rs b/src/emitter.rs
index 213da01..0c365a8 100644
--- a/src/emitter.rs
+++ b/src/emitter.rs
@@ -168,6 +168,9 @@ impl<'a> YamlEmitter<'a> {
self.multiline_strings
}
+ /// Dump Yaml to an output stream.
+ /// # Errors
+ /// Returns `EmitError` when an error occurs.
p... | 5 | 25 | 4 |
b35c20d72ec82309adeedd9c1282a26692dadd40 | David Aguilar | 2024-03-17T09:47:41 | Enable the redundant-else clippy checks | diff --git a/src/lib.rs b/src/lib.rs
index 5c5ca2b..c0ef93b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -37,7 +37,6 @@
clippy::should_implement_trait,
clippy::missing_errors_doc,
clippy::missing_panics_doc,
- clippy::redundant_else,
)
)]
diff --git a/src/parser.rs b/src/parser.... | 3 | 16 | 21 |
4529778f763a2fdccc287ed0cc3601268e7bcd0b | David Aguilar | 2024-03-17T09:18:39 | Enable the case-arms clippy checks | diff --git a/src/lib.rs b/src/lib.rs
index abb41c8..5c5ca2b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -30,12 +30,10 @@
//!
//! ```
-#![doc(html_root_url = "https://docs.rs/yaml-rust2/0.5.0")]
#![cfg_attr(feature = "cargo-clippy", warn(clippy::pedantic))]
#![cfg_attr(
feature = "cargo-clippy",
allow(
-... | 3 | 2 | 6 |
74c7df20164ac856086d0a820e306c4d8351bbcb | lincoln auster [they/them] | 2021-10-02T01:11:09 | implement `borrowed_or`
Allow the usage of `or` without consuming self. This can be useful
for pipelines that maintain some sort of owned state. | diff --git a/src/yaml.rs b/src/yaml.rs
index a6dc1f0..328775d 100644
--- a/src/yaml.rs
+++ b/src/yaml.rs
@@ -400,6 +400,16 @@ impl Yaml {
this => this,
}
}
+
+ /// See `or` for behavior. This performs the same operations, but with
+ /// borrowed values for less linear pipelines.
+ #[... | 1 | 10 | 0 |
de1fd524740ef7271536561126f7cea56cf3a794 | lincoln auster [they/them] | 2021-09-29T05:06:37 | introduce `or` function
Similarly to `or` for Rust's options, this patch provides a way to
'override' the value of a Yaml node if it's some form of error. | diff --git a/src/yaml.rs b/src/yaml.rs
index 0d02f34..a6dc1f0 100644
--- a/src/yaml.rs
+++ b/src/yaml.rs
@@ -383,6 +383,23 @@ impl Yaml {
pub fn into_f64(self) -> Option<f64> {
self.as_f64()
}
+
+ /// If a value is null or otherwise bad (see variants), consume it and
+ /// replace it with a giv... | 1 | 24 | 1 |
c6da43a12dfd961f10099b550d45ee9c11e3a270 | David Aguilar | 2024-03-17T08:40:46 | Update to quickcheck 1.0 | diff --git a/Cargo.toml b/Cargo.toml
index bcf98be..07da692 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,7 +20,7 @@ hashlink = "0.8"
[dev-dependencies]
libtest-mimic = "0.3.0"
-quickcheck = "0.9"
+quickcheck = "1.0"
[profile.release-lto]
inherits = "release" | 1 | 1 | 1 |
0ea4178f21a138044f74e57cb4b8d6bb9c998388 | Marko Mikulicic | 2020-07-30T01:23:53 | Use a YamlDecoder builder to implement optional encoding_trap parameter. | diff --git a/src/yaml.rs b/src/yaml.rs
index 5dc8c87..0d02f34 100644
--- a/src/yaml.rs
+++ b/src/yaml.rs
@@ -224,19 +224,51 @@ impl YamlLoader {
parser.load(&mut loader, true)?;
Ok(loader.docs)
}
+}
+
+/// YamlDecoder is a YamlLoader builder that allows you to supply your own encoding error trap.... | 1 | 63 | 12 |
cc0106bbd979c6e3548f535fa0fee6569e910e2d | Marko Mikulicic | 2020-05-05T12:53:06 | Implement load_from_bytes
Also helps in some cases with #142, when the BOM is at the beginning of
the file (common), but not in corner case where the BOM is at the start
of a document which is not the first one.
Closes: #155 | diff --git a/Cargo.toml b/Cargo.toml
index b4a2f62..bcf98be 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,6 +15,7 @@ edition = "2021"
[dependencies]
arraydeque = "0.5.1"
+encoding = "0.2"
hashlink = "0.8"
[dev-dependencies]
diff --git a/src/yaml.rs b/src/yaml.rs
index 0848b22..5dc8c87 100644
--- a/src/yaml.rs... | 2 | 120 | 6 |
9a1fc253225a945417398be6522fb843c6fad227 | Jim Turner | 2021-08-18T02:07:07 | Add byte a offset to the error message | diff --git a/src/scanner.rs b/src/scanner.rs
index 24a33dd..dff285b 100644
--- a/src/scanner.rs
+++ b/src/scanner.rs
@@ -108,10 +108,11 @@ impl fmt::Display for ScanError {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
write!(
formatter,
- "{} at line {} column {}"... | 2 | 4 | 3 |
bd931e1b8b273683fa517352eed91c98e2461910 | larkbyte | 2020-05-26T10:35:06 | Replace linked_hash_map with hashlink | diff --git a/Cargo.toml b/Cargo.toml
index a62945d..b4a2f62 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,7 +15,7 @@ edition = "2021"
[dependencies]
arraydeque = "0.5.1"
-linked-hash-map = "0.5.3"
+hashlink = "0.8"
[dev-dependencies]
libtest-mimic = "0.3.0"
diff --git a/src/lib.rs b/src/lib.rs
index 7c01b66..... | 3 | 3 | 3 |
db5bfa5b49ce0158a50606a5b8850115d791b80b | David Aguilar | 2024-03-17T07:49:13 | Cargo.toml: enable the Rust 2021 Edition | diff --git a/Cargo.toml b/Cargo.toml
index c69712e..a62945d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
description = "A fully YAML 1.2 compliant YAML parser"
repository = "https://github.com/Ethiraric/yaml-rust2"
readme = "README.md"
-edition = "2018"
+edition = "2021"
... | 1 | 1 | 1 |
83d6cff7c1f91c2fa830a06f96cd23826cb15035 | David Aguilar | 2024-03-17T07:48:26 | Cargo.toml: add myself to the authors list | diff --git a/Cargo.toml b/Cargo.toml
index 89b7583..c69712e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,8 @@ name = "yaml-rust2"
version = "0.6.0"
authors = [
"Yuheng Chen <yuhengchen@sensetime.com>",
- "Ethiraric <ethiraric@gmail.com>"
+ "Ethiraric <ethiraric@gmail.com>",
+ "David Aguilar <davvid@gmail... | 1 | 2 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.