Skip to content

Commit 946b8d6

Browse files
authored
refactor: bump to syn 2.0 (#663)
1 parent 00e2367 commit 946b8d6

File tree

3 files changed

+11
-22
lines changed

3 files changed

+11
-22
lines changed

Cargo.lock

+8-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tskit-derive/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ homepage = "https://github.com/tskit-dev/tskit-rust"
1212
proc-macro = true
1313

1414
[dependencies]
15-
syn = { version = "1.0", features = ["derive"] }
15+
syn = { version = "2.0", features = ["derive"] }
1616
quote = "1.0"
1717
proc-macro-error2 = "2.0"

tskit-derive/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn impl_metadata_roundtrip_macro(ast: &syn::DeriveInput) -> Result<TokenStream,
5555
let attrs = &ast.attrs;
5656

5757
for attr in attrs.iter() {
58-
if attr.path.is_ident("serializer") {
58+
if attr.path().is_ident("serializer") {
5959
let lit: syn::LitStr = attr.parse_args().unwrap();
6060
let serializer = lit.value();
6161

@@ -67,7 +67,7 @@ fn impl_metadata_roundtrip_macro(ast: &syn::DeriveInput) -> Result<TokenStream,
6767
proc_macro_error2::abort!(serializer, "is not a supported protocol.");
6868
}
6969
} else {
70-
proc_macro_error2::abort!(attr.path, "is not a supported attribute.");
70+
proc_macro_error2::abort!(attr.path(), "is not a supported attribute.");
7171
}
7272
}
7373

0 commit comments

Comments
 (0)