aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/input.rs
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-07-04 09:40:53 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-07-04 09:40:53 +0200
commit191e56a5304b5bce27b6db14335d54d293839681 (patch)
tree640e2ce49363e82d272fcda6c44cd19c43b9684e /askama_derive/src/input.rs
parentd562ebbbf79dbc62f0714fc0c62d3cbcf2e0a3f6 (diff)
downloadaskama-191e56a5304b5bce27b6db14335d54d293839681.tar.gz
askama-191e56a5304b5bce27b6db14335d54d293839681.tar.bz2
askama-191e56a5304b5bce27b6db14335d54d293839681.zip
Remove restrictions to named field structs (fixes #101)
Diffstat (limited to 'askama_derive/src/input.rs')
-rw-r--r--askama_derive/src/input.rs2
1 files changed, 1 insertions, 1 deletions
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 {