From babea28312387a22642cb974cc4b97e9fe7fed49 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Tue, 10 Oct 2023 15:10:12 +0200 Subject: Build Config from TemplateArgs --- askama_derive/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'askama_derive/src/lib.rs') diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs index a133813..a5eb67a 100644 --- a/askama_derive/src/lib.rs +++ b/askama_derive/src/lib.rs @@ -10,7 +10,6 @@ use proc_macro2::Span; use parser::ParseError; mod config; -use config::Config; mod generator; use generator::{Generator, MapChain}; mod heritage; @@ -36,7 +35,7 @@ pub fn derive_template(input: TokenStream) -> TokenStream { /// value as passed to the `template()` attribute. pub(crate) fn build_template(ast: &syn::DeriveInput) -> Result { let template_args = TemplateArgs::new(ast)?; - let config = Config::new(&template_args.config, template_args.whitespace.as_ref())?; + let config = template_args.config()?; let input = TemplateInput::new(ast, &config, &template_args)?; let mut templates = HashMap::new(); -- cgit