From 2bb56052711eb68794d920ad36f1c5d3ebf88a99 Mon Sep 17 00:00:00 2001 From: Hendrik Sollich Date: Wed, 1 Nov 2023 22:10:23 +0100 Subject: [PATCH] chore: update handlebars --- Cargo.lock | 48 ++++++++++---------------------------- Cargo.toml | 2 +- src/document_export/mod.rs | 4 ++-- 3 files changed, 15 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4b294854c..9ba66b1ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1007,7 +1007,7 @@ checksum = "04db38a154dbc8411c49a39b0c514fc29951deaf179bebee581ceb9f72a52c85" dependencies = [ "lazy_static 0.2.11", "regex 0.2.11", - "walkdir 1.0.7", + "walkdir", ] [[package]] @@ -1446,27 +1446,16 @@ dependencies = [ [[package]] name = "handlebars" -version = "2.0.4" +version = "3.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af92141a22acceb515fb6b13ac59d6d0b3dd3437e13832573af8e0d3247f29d5" +checksum = "4498fc115fa7d34de968184e473529abb40eeb6be8bc5f7faba3d08c316cb3e3" dependencies = [ - "hashbrown 0.5.0", "log", "pest", "pest_derive", - "quick-error", + "quick-error 2.0.1", "serde", "serde_json", - "walkdir 2.4.0", -] - -[[package]] -name = "hashbrown" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353" -dependencies = [ - "serde", ] [[package]] @@ -2306,6 +2295,12 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + [[package]] name = "quote" version = "1.0.33" @@ -2549,7 +2544,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" dependencies = [ "hostname", - "quick-error", + "quick-error 1.2.3", ] [[package]] @@ -2646,15 +2641,6 @@ dependencies = [ "winapi 0.2.8", ] -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - [[package]] name = "scopeguard" version = "1.2.0" @@ -3394,20 +3380,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff" dependencies = [ "kernel32-sys", - "same-file 0.1.3", + "same-file", "winapi 0.2.8", ] -[[package]] -name = "walkdir" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" -dependencies = [ - "same-file 1.0.6", - "winapi-util", -] - [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" diff --git a/Cargo.toml b/Cargo.toml index cf33cb24e..d64a45cfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,7 +69,7 @@ prettytable-rs = { default-features = false, version = "0.10" } # feature: document_export # TODO: update to 4.x is trivial but requires testing with current content -handlebars = { version = "2.0", optional = true } +handlebars = { version = "3.0", optional = true } serde = { version = "1.0", optional = true } serde_json = { version = "1.0", optional = true } diff --git a/src/document_export/mod.rs b/src/document_export/mod.rs index 6bd332249..4b0cfe6cb 100644 --- a/src/document_export/mod.rs +++ b/src/document_export/mod.rs @@ -56,7 +56,7 @@ impl HelperDef for IncHelper { h: &Helper<'_, '_>, _: &Handlebars, _: &Context, - _: &mut RenderContext<'_>, + _: &mut RenderContext<'_, '_>, out: &mut dyn Output, ) -> HelperResult { let param = h.param(0).unwrap().value(); @@ -79,7 +79,7 @@ impl HelperDef for CountHelper { h: &Helper<'_, '_>, _: &Handlebars, _: &Context, - _: &mut RenderContext<'_>, + _: &mut RenderContext<'_, '_>, out: &mut dyn Output, ) -> HelperResult { let count = h.param(0).unwrap().value().as_array().map_or(0, Vec::len);