Skip to content

Commit

Permalink
Upgrade syn to "2".
Browse files Browse the repository at this point in the history
  • Loading branch information
CGMossa committed Nov 27, 2023
1 parent f699ad0 commit 5240b57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ proc-macro = true
[dependencies]
proc-macro2 = "1"
quote = "1"
syn = { version = "1", features = ["full"] }
syn = { version = "2", features = ["full"] }
4 changes: 2 additions & 2 deletions macros/src/track.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ enum Kind {

/// Preprocess and validate a method in an impl block.
fn prepare_impl_method(item: &syn::ImplItem) -> Result<Method> {
let syn::ImplItem::Method(method) = item else {
let syn::ImplItem::Fn(method) = item else {
bail!(item, "only methods can be tracked");
};

Expand All @@ -78,7 +78,7 @@ fn prepare_impl_method(item: &syn::ImplItem) -> Result<Method> {

/// Preprocess and validate a method in a trait.
fn prepare_trait_method(item: &syn::TraitItem) -> Result<Method> {
let syn::TraitItem::Method(method) = item else {
let syn::TraitItem::Fn(method) = item else {
bail!(item, "only methods can be tracked");
};

Expand Down

0 comments on commit 5240b57

Please sign in to comment.