From 58b3c1c283480db2ec7f72a211dcc1d4e7dd51a9 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Fri, 17 Feb 2017 15:12:43 +0100 Subject: Cleanups as suggested by clippy --- askama/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/askama/src/lib.rs b/askama/src/lib.rs index c727f48..b922906 100644 --- a/askama/src/lib.rs +++ b/askama/src/lib.rs @@ -29,16 +29,16 @@ fn get_template_meta(ast: &syn::DeriveInput) -> TemplateMeta { let attr = ast.attrs.iter().find(|a| a.name() == "template").unwrap(); if let syn::MetaItem::List(_, ref inner) = attr.value { for nm_item in inner { - if let &syn::NestedMetaItem::MetaItem(ref item) = nm_item { - if let &syn::MetaItem::NameValue(ref key, ref val) = item { + if let syn::NestedMetaItem::MetaItem(ref item) = *nm_item { + if let syn::MetaItem::NameValue(ref key, ref val) = *item { match key.as_ref() { - "path" => if let &syn::Lit::Str(ref s, _) = val { + "path" => if let syn::Lit::Str(ref s, _) = *val { path = Some(s.clone()); } else { panic!("template path must be string literal"); }, - "print" => if let &syn::Lit::Str(ref s, _) = val { - print = if s == "true" { true } else { false }; + "print" => if let syn::Lit::Str(ref s, _) = *val { + print = s == "true"; } else { panic!("print value must be string literal"); }, -- cgit