Skip to content

Commit

Permalink
Merge pull request #10 from Y-Nak/bumpup-syn
Browse files Browse the repository at this point in the history
Bumpup syn version to 2.0
  • Loading branch information
Y-Nak authored Nov 22, 2024
2 parents 396f5be + 1293fb5 commit b235dcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description = "Provides a procedural macro for `dir-test`"
proc_macro = true

[dependencies]
syn = { version = "1.0", features = ["full"] }
syn = { version = "2.0", features = ["full"] }
proc-macro2 = "1.0"
quote = "1.0"
glob = "0.3"
6 changes: 2 additions & 4 deletions macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use std::{

use proc_macro2::Span;
use quote::quote;

use syn::Token;

type Error = syn::Error;
Expand Down Expand Up @@ -51,8 +50,7 @@ impl TestBuilder {
let mut pattern = self.dir_test_arg.resolve_dir()?;

pattern.push(
&self
.dir_test_arg
self.dir_test_arg
.glob
.clone()
.map_or_else(|| "*".to_string(), |g| g.value()),
Expand Down Expand Up @@ -143,7 +141,7 @@ impl TestBuilder {
fn extract_test_attrs(&mut self) -> Result<()> {
let mut err = Ok(());
self.func.attrs.retain(|attr| {
if attr.path.is_ident("dir_test_attr") {
if attr.path().is_ident("dir_test_attr") {
err = err
.clone()
.and(attr.parse_args_with(|input: syn::parse::ParseStream| {
Expand Down

0 comments on commit b235dcc

Please sign in to comment.