Skip to content

Commit

Permalink
fix: raise syn to 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodie committed Jul 25, 2023
1 parent 84adb29 commit adfd6d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ edition = "2021"
proc-macro = true

[dependencies]
syn = "1"
syn = "2"
quote = "1"
proc-macro2 = "1"
10 changes: 6 additions & 4 deletions src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ pub fn has_binding_arguments(segments: &[syn::PathSegment]) -> bool {
if let Some(&syn::PathArguments::AngleBracketed(ref generics)) =
segments.last().map(|x| &x.arguments)
{
generics
.args
.iter()
.any(|f| matches!(f, syn::GenericArgument::Binding(_)))
generics.args.iter().any(|f| {
matches!(
f,
syn::GenericArgument::AssocConst(_) | syn::GenericArgument::AssocType(_)
)
})
} else {
false
}
Expand Down

0 comments on commit adfd6d4

Please sign in to comment.