From 49715db9bd2dee9d003ab9c5460270ea64a85c3b Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Tue, 01 Nov 2022 10:40:08 +0000 Subject: [PATCH] Merge pull request #668 from UniqueNetwork/fix/fix-compilation-warnings Fix compilation warnings --- --- a/crates/evm-coder/procedural/src/solidity_interface.rs +++ b/crates/evm-coder/procedural/src/solidity_interface.rs @@ -718,7 +718,11 @@ } } } else { - quote! {#pascal_name} + quote! { + #(#[doc = #docs])* + #[allow(missing_docs)] + #pascal_name + } } } @@ -788,6 +792,7 @@ quote! { #call_name::#pascal_name #matcher => { + #[allow(deprecated)] let result = #receiver #name( #( #args, --- a/crates/evm-coder/procedural/src/to_log.rs +++ b/crates/evm-coder/procedural/src/to_log.rs @@ -194,7 +194,7 @@ #( #consts )* - + /// Generate solidity definitions for methods described in this interface pub fn generate_solidity_interface(tc: &evm_coder::solidity::TypeCollector, is_impl: bool) { use evm_coder::solidity::*; use core::fmt::Write; --- a/pallets/common/src/erc.rs +++ b/pallets/common/src/erc.rs @@ -64,6 +64,7 @@ /// Does not always represent a full collection, for RFT it is either /// collection (Implementing ERC721), or specific collection token (Implementing ERC20). pub trait CommonEvmHandler { + /// Raw compiled binary code of the contract stub const CODE: &'static [u8]; /// Call precompiled handle. --- a/pallets/common/src/weights.rs +++ b/pallets/common/src/weights.rs @@ -26,6 +26,7 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] #![allow(clippy::unnecessary_cast)] use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; --- a/pallets/evm-contract-helpers/src/lib.rs +++ b/pallets/evm-contract-helpers/src/lib.rs @@ -172,7 +172,7 @@ >; #[pallet::event] - #[pallet::generate_deposit(pub fn deposit_event)] + #[pallet::generate_deposit(fn deposit_event)] pub enum Event { /// Contract sponsor was set. ContractSponsorSet( @@ -350,6 +350,7 @@ pub fn sponsoring_mode(contract: H160) -> SponsoringModeT { >::get(contract) .or_else(|| { + #[allow(deprecated)] >::get(contract).then(|| SponsoringModeT::Allowlisted) }) .unwrap_or_default() @@ -362,6 +363,7 @@ } else { >::insert(contract, mode); } + #[allow(deprecated)] >::remove(contract) } @@ -424,6 +426,7 @@ _ => return None, }) } + #[allow(dead_code)] fn to_eth(self) -> u8 { match self { SponsoringModeT::Disabled => 0, --- a/pallets/refungible/src/lib.rs +++ b/pallets/refungible/src/lib.rs @@ -137,7 +137,6 @@ /// for the convenience of database access. Notably contains the token metadata. #[struct_versioning::versioned(version = 2, upper)] #[derive(Encode, Decode, Default, TypeInfo, MaxEncodedLen)] -#[deprecated(since = "0.2.0", note = "ItemData is no more contains usefull data")] pub struct ItemData { pub const_data: BoundedVec, @@ -279,7 +278,8 @@ fn on_runtime_upgrade() -> Weight { let storage_version = StorageVersion::get::>(); if storage_version < StorageVersion::new(2) { - >::remove_all(None); + #[allow(deprecated)] + let _ = >::clear(u32::MAX, None); } StorageVersion::new(2).put::>(); -- gitstuff