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/input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'askama_derive/src/input.rs') diff --git a/askama_derive/src/input.rs b/askama_derive/src/input.rs index 15a4a6d..6e349da 100644 --- a/askama_derive/src/input.rs +++ b/askama_derive/src/input.rs @@ -119,7 +119,7 @@ impl<'a> TemplateInput<'a> { .iter() .find(|f| f.ident.as_ref().filter(|name| *name == "_parent").is_some()) .map(|f| &f.ty), - _ => panic!("derive(Template) only works for struct items"), + _ => None, }; TemplateInput { -- cgit