Bump all in-tree components to syn 1

This commit is contained in:
Anthony Ramine 2019-09-27 12:41:57 +02:00
parent 2d823d7721
commit 99ef7813f2
15 changed files with 94 additions and 86 deletions

View file

@ -12,7 +12,7 @@ proc-macro = true
path = "lib.rs"
[dependencies]
syn = { version = "0.15", default-features = false, features = ["clone-impls", "parsing"] }
quote = "0.6"
proc-macro2 = "0.4"
syn = { version = "1", default-features = false, features = ["clone-impls", "parsing"] }
quote = "1"
proc-macro2 = "1"
itertools = "0.8"

View file

@ -196,15 +196,15 @@ impl Field {
fn attr_to_pref_name(attr: &Attribute) -> Option<LitStr> {
attr.parse_meta().ok().and_then(|meta| {
if let Meta::List(MetaList { ident, nested, .. }) = meta {
if ident.to_string() == "serde" {
if let Meta::List(MetaList { path, nested, .. }) = meta {
if path.is_ident("serde") {
if let Some(NestedMeta::Meta(Meta::NameValue(MetaNameValue {
ref ident,
ref path,
lit: Lit::Str(val),
..
}))) = nested.iter().next()
{
if ident.to_string() == "rename" {
if path.is_ident("rename") {
return Some(val.clone());
}
}