Skip to content

Commit

Permalink
update some deps that point to syn1 (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkhry authored Jun 27, 2024
1 parent 1ca2602 commit 0fcccc1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scale-decode-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ include.workspace = true
proc-macro = true

[dependencies]
syn = { version = "1", features = ["full"] }
syn = { version = "2", features = ["full"] }
quote = "1"
proc-macro2 = "1"
darling = "0.14.2"
darling = "0.20.9"
10 changes: 7 additions & 3 deletions scale-decode-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// https://github.com/rust-lang/rust-clippy/issues/12643.
// related to `darling::default` attribute expansion
#![allow(clippy::manual_unwrap_or_default)]

extern crate alloc;

use alloc::string::ToString;
Expand Down Expand Up @@ -539,11 +543,11 @@ impl TopLevelAttrs {

// look at each top level attr. parse any for decode_as_type.
for attr in attrs {
if !attr.path.is_ident(ATTR_NAME) {
if !attr.path().is_ident(ATTR_NAME) {
continue;
}
let meta = attr.parse_meta()?;
let parsed_attrs = TopLevelAttrsInner::from_meta(&meta)?;
let meta = &attr.meta;
let parsed_attrs = TopLevelAttrsInner::from_meta(meta)?;

res.trait_bounds = parsed_attrs.trait_bounds;
if let Some(crate_path) = parsed_attrs.crate_path {
Expand Down

0 comments on commit 0fcccc1

Please sign in to comment.