From 0fcccc173029b1827d63b75aa9c39362d65614af Mon Sep 17 00:00:00 2001 From: Pavlo Khrystenko <45178695+pkhry@users.noreply.github.com> Date: Thu, 27 Jun 2024 15:16:01 +0200 Subject: [PATCH] update some deps that point to syn1 (#60) --- scale-decode-derive/Cargo.toml | 4 ++-- scale-decode-derive/src/lib.rs | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/scale-decode-derive/Cargo.toml b/scale-decode-derive/Cargo.toml index 2b8ae89..7e7e732 100644 --- a/scale-decode-derive/Cargo.toml +++ b/scale-decode-derive/Cargo.toml @@ -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" diff --git a/scale-decode-derive/src/lib.rs b/scale-decode-derive/src/lib.rs index 866b3bd..4d44700 100644 --- a/scale-decode-derive/src/lib.rs +++ b/scale-decode-derive/src/lib.rs @@ -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; @@ -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 {