From 70c5784a9ebc1e2f9e97d5358c7b686111ea18f4 Mon Sep 17 00:00:00 2001 From: René Kijewski Date: Mon, 20 Feb 2023 11:46:41 +0100 Subject: Revert "derive: Make Config `'static`" --- askama_derive/src/input.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'askama_derive/src/input.rs') diff --git a/askama_derive/src/input.rs b/askama_derive/src/input.rs index b8a0da4..47d51bd 100644 --- a/askama_derive/src/input.rs +++ b/askama_derive/src/input.rs @@ -9,8 +9,8 @@ use mime::Mime; pub(crate) struct TemplateInput<'a> { pub(crate) ast: &'a syn::DeriveInput, - pub(crate) config: &'a Config, - pub(crate) syntax: &'a Syntax, + pub(crate) config: &'a Config<'a>, + pub(crate) syntax: &'a Syntax<'a>, pub(crate) source: Source, pub(crate) print: Print, pub(crate) escaper: &'a str, @@ -25,7 +25,7 @@ impl TemplateInput<'_> { /// `template()` attribute list fields. pub(crate) fn new<'n>( ast: &'n syn::DeriveInput, - config: &'n Config, + config: &'n Config<'_>, args: TemplateArgs, ) -> Result, CompileError> { let TemplateArgs { @@ -51,7 +51,7 @@ impl TemplateInput<'_> { // Validate syntax let syntax = syntax.map_or_else( - || Ok(config.syntaxes.get(&config.default_syntax).unwrap()), + || Ok(config.syntaxes.get(config.default_syntax).unwrap()), |s| { config .syntaxes -- cgit