Skip to content

chore: Bump syn -> 2.0 #287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
name: Code coverage
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop
image: xd009642/tarpaulin:0.27.1
options: --security-opt seccomp=unconfined
steps:
- name: Checkout sources
Expand Down
84 changes: 45 additions & 39 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions examples/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions sylvia-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ cosmwasm_1_2 = []
proc-macro = true

[dependencies]
syn = { version = "1.0.107", features = [
"parsing",
"derive",
syn = { version = "2.0.48", features = [
"fold",
"visit",
"full",
Expand Down
14 changes: 9 additions & 5 deletions sylvia-derive/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,20 @@ impl<'a> ImplInput<'a> {
let error = item
.attrs
.iter()
.find(|attr| attr.path.is_ident("error"))
.and_then(
|attr| match ContractErrorAttr::parse.parse2(attr.tokens.clone()) {
.find(|attr| attr.path().is_ident("error"))
.and_then(|attr| {
match attr
.meta
.require_list()
.and_then(|meta| ContractErrorAttr::parse.parse2(meta.tokens.clone()))
{
Ok(error) => Some(error.error),
Err(err) => {
emit_error!(attr.span(), err);
None
}
},
)
}
})
.unwrap_or_else(|| parse_quote! { #sylvia ::cw_std::StdError });

let custom = Custom::new(&item.attrs);
Expand Down
8 changes: 6 additions & 2 deletions sylvia-derive/src/interfaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ impl Interfaces {
let interfaces: Vec<_> = source
.attrs
.iter()
.filter(|attr| attr.path.is_ident("messages"))
.filter(|attr| attr.path().is_ident("messages"))
.filter_map(|attr| {
let interface = match ContractMessageAttr::parse.parse2(attr.tokens.clone()) {
let interface = match attr
.meta
.require_list()
.and_then(|meta| ContractMessageAttr::parse.parse2(meta.tokens.clone()))
{
Ok(interface) => interface,
Err(err) => {
emit_error!(attr.span(), err);
Expand Down
Loading