diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2017-02-17 15:12:43 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2017-02-17 15:12:43 +0100 |
commit | 58b3c1c283480db2ec7f72a211dcc1d4e7dd51a9 (patch) | |
tree | 9dff7899cac660fc50ba661a41cab71e0fd9b625 | |
parent | 2f75ba090f7a964624b6be4c3de42248bf3f1d90 (diff) | |
download | askama-58b3c1c283480db2ec7f72a211dcc1d4e7dd51a9.tar.gz askama-58b3c1c283480db2ec7f72a211dcc1d4e7dd51a9.tar.bz2 askama-58b3c1c283480db2ec7f72a211dcc1d4e7dd51a9.zip |
Cleanups as suggested by clippy
Diffstat (limited to '')
-rw-r--r-- | askama/src/lib.rs | 10 |
1 files 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"); }, |