Skip to content

Commit

Permalink
Merge pull request #691 from gwenn/syn
Browse files Browse the repository at this point in the history
Upgrade syn version
  • Loading branch information
gwenn authored Mar 19, 2023
2 parents 938497d + 6ab2eb2 commit eab38db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rustyline-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ maintenance = { status = "actively-developed" }
proc-macro = true

[dependencies]
syn = { version = "1.0", default-features = false, features = ["derive", "parsing", "printing", "proc-macro"] }
syn = { version = "2.0", default-features = false, features = ["derive", "parsing", "printing", "proc-macro"] }
quote = { version = "1.0", default-features = false }
proc-macro2 = { version = "1.0", default-features = false }
2 changes: 1 addition & 1 deletion rustyline-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn get_field_by_attr<'a>(data: &'a Data, ident: &str) -> Option<(usize, &'a Fiel
if let Data::Struct(struct_data) = &data {
let mut fields = struct_data.fields.iter().enumerate().filter(|(_, field)| {
field.attrs.iter().any(|attr| {
attr.path.is_ident("rustyline")
attr.path().is_ident("rustyline")
&& attr
.parse_args::<Path>()
.map_or(false, |arg| arg.is_ident(ident))
Expand Down

0 comments on commit eab38db

Please sign in to comment.