Skip to content

Commit

Permalink
chore: bump syn -> 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kulikthebird committed Jan 22, 2024
1 parent 511d88b commit a373829
Show file tree
Hide file tree
Showing 10 changed files with 164 additions and 137 deletions.
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

0 comments on commit a373829

Please sign in to comment.