Skip to content
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

update some of the deps to use syn2 #24

Merged
merged 1 commit into from
Jun 27, 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
6 changes: 3 additions & 3 deletions scale-encode-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ include.workspace = true
proc-macro = true

[dependencies]
syn = { version = "1", features = ["full"] }
syn = { version = "2", features = ["full"] }
quote = "1"
proc-macro2 = "1"
proc-macro-crate = "1"
darling = "0.14.2"
proc-macro-crate = "3.1.0"
darling = "0.20.9"
10 changes: 7 additions & 3 deletions scale-encode-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)]

use darling::FromAttributes;
use proc_macro2::TokenStream as TokenStream2;
use quote::{format_ident, quote};
Expand Down Expand Up @@ -250,11 +254,11 @@ impl TopLevelAttrs {

// look at each top level attr. parse any for encode_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
2 changes: 1 addition & 1 deletion scale-encode/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ scale-bits = { version = "0.6.0", default-features = false, optional = true }
scale-encode-derive = { workspace = true, optional = true }
primitive-types = { version = "0.12.0", optional = true, default-features = false }
smallvec = "1.10.0"
derive_more = { version = "0.99.17", default-features = false, features = ["from", "display"] }
derive_more = { version = "0.99.18", default-features = false, features = ["from", "display"] }

[dev-dependencies]
bitvec = { version = "1.0.1", default-features = false }
Expand Down
Loading