From 3e42d0ee7c7264bf23518648db79e81b34cc543b Mon Sep 17 00:00:00 2001 From: Laurent Wandrebeck Date: Tue, 4 Oct 2022 10:55:34 +0200 Subject: [PATCH 1/2] Update deps and swith to 2021 edition --- bootstrap/Cargo.toml | 2 +- derive/Cargo.toml | 2 +- generator/Cargo.toml | 2 +- grammars/Cargo.toml | 2 +- meta/Cargo.toml | 2 +- pest/Cargo.toml | 10 +++++----- vm/Cargo.toml | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bootstrap/Cargo.toml b/bootstrap/Cargo.toml index 867d2095..6b6d4188 100644 --- a/bootstrap/Cargo.toml +++ b/bootstrap/Cargo.toml @@ -2,7 +2,7 @@ name = "pest_bootstrap" description = "pest bootstrap script" version = "0.0.0" -edition = "2018" +edition = "2021" authors = ["Dragoș Tiselice "] homepage = "https://pest-parser.github.io/" repository = "https://github.com/pest-parser/pest" diff --git a/derive/Cargo.toml b/derive/Cargo.toml index accff558..e0c437bd 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -2,7 +2,7 @@ name = "pest_derive" description = "pest's derive macro" version = "2.4.0" -edition = "2018" +edition = "2021" authors = ["Dragoș Tiselice "] homepage = "https://pest-parser.github.io/" repository = "https://github.com/pest-parser/pest" diff --git a/generator/Cargo.toml b/generator/Cargo.toml index 7f0a2a9c..471667dc 100644 --- a/generator/Cargo.toml +++ b/generator/Cargo.toml @@ -2,7 +2,7 @@ name = "pest_generator" description = "pest code generator" version = "2.4.0" -edition = "2018" +edition = "2021" authors = ["Dragoș Tiselice "] homepage = "https://pest-parser.github.io/" repository = "https://github.com/pest-parser/pest" diff --git a/grammars/Cargo.toml b/grammars/Cargo.toml index db1f4645..19943680 100644 --- a/grammars/Cargo.toml +++ b/grammars/Cargo.toml @@ -2,7 +2,7 @@ name = "pest_grammars" description = "pest popular grammar implementations" version = "2.4.0" -edition = "2018" +edition = "2021" authors = ["Dragoș Tiselice "] homepage = "https://pest-parser.github.io/" repository = "https://github.com/pest-parser/pest" diff --git a/meta/Cargo.toml b/meta/Cargo.toml index ce174a2d..e8f19d9c 100644 --- a/meta/Cargo.toml +++ b/meta/Cargo.toml @@ -2,7 +2,7 @@ name = "pest_meta" description = "pest meta language parser and validator" version = "2.4.0" -edition = "2018" +edition = "2021" authors = ["Dragoș Tiselice "] homepage = "https://pest-parser.github.io/" repository = "https://github.com/pest-parser/pest" diff --git a/pest/Cargo.toml b/pest/Cargo.toml index 4dbc7dd8..2cb4477a 100644 --- a/pest/Cargo.toml +++ b/pest/Cargo.toml @@ -2,7 +2,7 @@ name = "pest" description = "The Elegant Parser" version = "2.4.0" -edition = "2018" +edition = "2021" authors = ["Dragoș Tiselice "] homepage = "https://pest-parser.github.io/" repository = "https://github.com/pest-parser/pest" @@ -26,9 +26,9 @@ const_prec_climber = [] fast-line-col = ["memchr", "bytecount"] [dependencies] -ucd-trie = { version = "0.1.1", default-features = false } -serde = { version = "1.0.89", optional = true } -serde_json = { version = "1.0.39", optional = true} -thiserror = { version = "1.0.31", optional = true } +ucd-trie = { version = "0.1.5", default-features = false } +serde = { version = "1.0.145", optional = true } +serde_json = { version = "1.0.85", optional = true} +thiserror = { version = "1.0.37", optional = true } memchr = { version = "2", optional = true } bytecount = { version = "0.6", optional = true } diff --git a/vm/Cargo.toml b/vm/Cargo.toml index 122754a0..1d07e4a7 100644 --- a/vm/Cargo.toml +++ b/vm/Cargo.toml @@ -2,7 +2,7 @@ name = "pest_vm" description = "pest grammar virtual machine" version = "2.4.0" -edition = "2018" +edition = "2021" authors = ["Dragoș Tiselice "] homepage = "https://pest-parser.github.io/" repository = "https://github.com/pest-parser/pest" From 2084aaaf304b2bbc8e6d91fe3be965753dd7c7f6 Mon Sep 17 00:00:00 2001 From: Laurent Wandrebeck Date: Tue, 4 Oct 2022 11:53:03 +0200 Subject: [PATCH 2/2] fix up panic macro usage --- meta/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/src/lib.rs b/meta/src/lib.rs index 4e178be6..3b808a98 100644 --- a/meta/src/lib.rs +++ b/meta/src/lib.rs @@ -28,7 +28,8 @@ where { result.unwrap_or_else(|e| { panic!( - "grammar error\n\n{}", + "{}{}", + "grammar error\n\n".to_owned(), &e.into_iter() .map(|error| format!("{}", error)) .collect::>()