diff --git a/contrib/lib/Cargo.toml b/contrib/lib/Cargo.toml index b8d144b1..38fabde5 100644 --- a/contrib/lib/Cargo.toml +++ b/contrib/lib/Cargo.toml @@ -55,7 +55,7 @@ rmp-serde = { version = "0.15.0", optional = true } # Templating dependencies. handlebars = { version = "3.0", optional = true } glob = { version = "0.3", optional = true } -tera = { version = "1.0.2", optional = true } +tera = { version = "1.10.0", optional = true } notify = { version = "4.0.6", optional = true } normpath = { version = "0.2", optional = true } diff --git a/contrib/lib/src/templates/engine.rs b/contrib/lib/src/templates/engine.rs index bb999679..26029c86 100644 --- a/contrib/lib/src/templates/engine.rs +++ b/contrib/lib/src/templates/engine.rs @@ -117,17 +117,17 @@ impl Engines { None } + /// Returns iterator over template (name, engine_extension). pub(crate) fn templates(&self) -> impl Iterator { #[cfg(all(feature = "tera_templates", feature = "handlebars_templates"))] { - self.tera.templates.keys() - .map(|name| (name.as_str(), Tera::EXT)) + self.tera.get_template_names() + .map(|name| (name, Tera::EXT)) .chain(self.handlebars.get_templates().keys() .map(|name| (name.as_str(), Handlebars::EXT))) } #[cfg(all(feature = "tera_templates", not(feature = "handlebars_templates")))] { - self.tera.templates.keys() - .map(|name| (name.as_str(), Tera::EXT)) + self.tera.get_template_names().map(|name| (name, Tera::EXT)) } #[cfg(all(feature = "handlebars_templates", not(feature = "tera_templates")))] {