mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Bump all in-tree components to syn 1
This commit is contained in:
parent
2d823d7721
commit
99ef7813f2
15 changed files with 94 additions and 86 deletions
|
@ -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"
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue