aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/input.rs
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-05-21 15:39:06 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-05-21 15:39:06 +0200
commit460db851543fdbd5777425f1c7aa06bb27e0c6c8 (patch)
treec918cf6f4d0eb283ae04e71254827581e736bd22 /askama_derive/src/input.rs
parent09eeaf869942b99146c25bd3065965aa846241db (diff)
downloadaskama-460db851543fdbd5777425f1c7aa06bb27e0c6c8.tar.gz
askama-460db851543fdbd5777425f1c7aa06bb27e0c6c8.tar.bz2
askama-460db851543fdbd5777425f1c7aa06bb27e0c6c8.zip
Upgrade to syn-0.14 and quote-0.6
Diffstat (limited to 'askama_derive/src/input.rs')
-rw-r--r--askama_derive/src/input.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/askama_derive/src/input.rs b/askama_derive/src/input.rs
index b2b815b..9ea8ddc 100644
--- a/askama_derive/src/input.rs
+++ b/askama_derive/src/input.rs
@@ -47,9 +47,7 @@ impl TemplateMeta {
.iter()
.find(|a| a.interpret_meta().unwrap().name() == "template");
if attr.is_none() {
- let msg = format!("'template' attribute not found on struct '{}'",
- ast.ident.as_ref());
- panic!(msg);
+ panic!(format!("'template' attribute not found on struct '{}'", ast.ident));
}
let attr = attr.unwrap();
@@ -61,7 +59,7 @@ impl TemplateMeta {
for nm_item in inner.nested.iter() {
if let syn::NestedMeta::Meta(ref item) = *nm_item {
if let syn::Meta::NameValue(ref pair) = *item {
- match pair.ident.as_ref() {
+ match pair.ident.to_string().as_ref() {
"path" => if let syn::Lit::Str(ref s) = pair.lit {
if source.is_some() {
panic!("must specify 'source' or 'path', not both");