From 191e56a5304b5bce27b6db14335d54d293839681 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 4 Jul 2018 09:40:53 +0200 Subject: Remove restrictions to named field structs (fixes #101) --- askama_derive/src/lib.rs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'askama_derive/src/lib.rs') diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs index e8166b0..4bdcb0a 100644 --- a/askama_derive/src/lib.rs +++ b/askama_derive/src/lib.rs @@ -22,10 +22,6 @@ use std::path::PathBuf; #[proc_macro_derive(Template, attributes(template))] pub fn derive_template(input: TokenStream) -> TokenStream { let ast: syn::DeriveInput = syn::parse(input).unwrap(); - match ast.data { - syn::Data::Struct(ref data) => data, - _ => panic!("#[derive(Template)] can only be used with structs"), - }; build_template(&ast).parse().unwrap() } -- cgit