From 018bc3d84ce4141f46cb7e871c32c090f2bfaf9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= <26653921+dj8yfo@users.noreply.github.com> Date: Tue, 21 May 2024 19:41:11 +0300 Subject: [PATCH] ci: fix new lints, introduced in 1.78 (#1181) --- examples/fungible-token/test-contract-defi/src/lib.rs | 1 + near-sdk-macros/src/core_impl/info_extractor/attr_sig_info.rs | 2 +- near-sdk/compilation_tests/schema_derive_invalids.stderr | 2 +- near-sdk/src/lib.rs | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/fungible-token/test-contract-defi/src/lib.rs b/examples/fungible-token/test-contract-defi/src/lib.rs index 8b6b7542c..83671a1e8 100644 --- a/examples/fungible-token/test-contract-defi/src/lib.rs +++ b/examples/fungible-token/test-contract-defi/src/lib.rs @@ -16,6 +16,7 @@ pub struct DeFi { } // Have to repeat the same trait for our own implementation. +#[allow(dead_code)] trait ValueReturnTrait { fn value_please(&self, amount_to_return: String) -> PromiseOrValue; } diff --git a/near-sdk-macros/src/core_impl/info_extractor/attr_sig_info.rs b/near-sdk-macros/src/core_impl/info_extractor/attr_sig_info.rs index 6eb010fa6..772565295 100644 --- a/near-sdk-macros/src/core_impl/info_extractor/attr_sig_info.rs +++ b/near-sdk-macros/src/core_impl/info_extractor/attr_sig_info.rs @@ -165,7 +165,7 @@ impl AttrSigInfo { self_occurrences.extend(args.iter().flat_map(|arg| arg.self_occurrences.clone())); - *original_attrs = non_bindgen_attrs.clone(); + original_attrs.clone_from(&non_bindgen_attrs); if matches!(method_kind, MethodKind::Call(_) | MethodKind::View(_)) { report_spans( diff --git a/near-sdk/compilation_tests/schema_derive_invalids.stderr b/near-sdk/compilation_tests/schema_derive_invalids.stderr index ceb7c3037..07717bd18 100644 --- a/near-sdk/compilation_tests/schema_derive_invalids.stderr +++ b/near-sdk/compilation_tests/schema_derive_invalids.stderr @@ -87,7 +87,7 @@ error[E0277]: the trait bound `Inner: JsonSchema` is not satisfied i128 and $N others note: required by a bound in `SchemaGenerator::subschema_for` - --> $CARGO/schemars-0.8.17/src/gen.rs + --> $CARGO/schemars-0.8.20/src/gen.rs | | pub fn subschema_for(&mut self) -> Schema { | ^^^^^^^^^^ required by this bound in `SchemaGenerator::subschema_for` diff --git a/near-sdk/src/lib.rs b/near-sdk/src/lib.rs index 8a219a258..45df0dbcd 100644 --- a/near-sdk/src/lib.rs +++ b/near-sdk/src/lib.rs @@ -3,6 +3,7 @@ #![allow(clippy::redundant_closure)] // We want to enable all clippy lints, but some of them generate false positives. #![allow(clippy::missing_const_for_fn, clippy::redundant_pub_crate)] +#![allow(clippy::multiple_bound_locations)] #[cfg(test)] extern crate quickcheck;