From 460db851543fdbd5777425f1c7aa06bb27e0c6c8 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 21 May 2018 15:39:06 +0200 Subject: Upgrade to syn-0.14 and quote-0.6 --- askama_derive/src/input.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'askama_derive/src/input.rs') 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"); -- cgit