Skip to content

Commit a681f42

Browse files
author
talentdev219
committed
Silence a few clippy warnings (#629)
* Silence a few clippy warnings * Deny warnings for mulitplication with one.
1 parent 75d8919 commit a681f42

File tree

7 files changed

+12
-1
lines changed

7 files changed

+12
-1
lines changed

node/src/chain_spec.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* You should have received a copy of the GNU General Public License
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
18+
#![allow(clippy::derive_partial_eq_without_eq)]
1819

1920
use cumulus_primitives_core::ParaId;
2021
use primitives::{AccountId, Balance, Signature};
@@ -39,7 +40,7 @@ pub fn get_public_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pa
3940
}
4041

4142
/// The extensions for the [`ChainSpec`].
42-
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]
43+
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]
4344
#[serde(rename_all = "camelCase")]
4445
pub struct Extensions {
4546
/// The relay chain of the Parachain.

node/src/service.rs

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ type HostFunctions = (
6161
///
6262
/// Use this macro if you don't actually need the full service, but just the builder in order to
6363
/// be able to perform chain operations.
64+
#[allow(clippy::type_complexity)]
6465
pub fn new_partial<RuntimeApi, BIQ>(
6566
config: &Configuration,
6667
build_import_queue: BIQ,
@@ -357,6 +358,7 @@ where
357358
}
358359

359360
/// Build the import queue for the rococo parachain runtime.
361+
#[allow(clippy::type_complexity)]
360362
pub fn parachain_build_import_queue(
361363
client: Arc<TFullClient<Block, runtime_eden::RuntimeApi, WasmExecutor<HostFunctions>>>,
362364
config: &Configuration,

pallets/mandate/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ pub mod pallet {
5252
#[pallet::hooks]
5353
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
5454

55+
#[allow(clippy::boxed_local)]
5556
#[pallet::call]
5657
impl<T: Config> Pallet<T> {
5758
/// Let the configured origin dispatch a call as root

pallets/reserve/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ pub mod pallet {
9696
Ok(().into())
9797
}
9898

99+
#[allow(clippy::boxed_local)]
99100
/// Dispatch a call as coming from the reserve account
100101
#[pallet::weight({
101102
let dispatch_info = call.get_dispatch_info();

pallets/staking/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1265,6 +1265,7 @@ pub mod pallet {
12651265
#[pallet::getter(fn bonded_sessions)]
12661266
pub(crate) type BondedSessions<T: Config> = StorageValue<_, Vec<SessionIndex>, ValueQuery>;
12671267

1268+
#[allow(clippy::type_complexity)]
12681269
#[pallet::genesis_config]
12691270
pub struct GenesisConfig<T: Config> {
12701271
pub stakers: Vec<(T::AccountId, Option<T::AccountId>, BalanceOf<T>)>,

runtimes/eden/src/pallets_system.rs

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

19+
#![allow(clippy::identity_op)]
20+
1921
use crate::{
2022
constants, implementations::DealWithFees, version::VERSION, Balances, Call, CompanyReserve, Event, Origin,
2123
PalletInfo, Runtime, SignedExtra, SignedPayload, System, UncheckedExtrinsic,

runtimes/eden/src/pallets_util.rs

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* You should have received a copy of the GNU General Public License
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
18+
#![allow(clippy::identity_op)]
19+
1820
use crate::{
1921
constants, implementations::RelayChainBlockNumberProvider, pallets_governance::MoreThanHalfOfTechComm, Balances,
2022
Call, Event, Origin, OriginCaller, Preimage, Runtime,
@@ -91,6 +93,7 @@ parameter_types! {
9193
pub const PreimageByteDeposit: Balance = constants::deposit(0, 1);
9294
}
9395

96+
#[allow(clippy::identity_op)]
9497
impl pallet_preimage::Config for Runtime {
9598
type WeightInfo = pallet_preimage::weights::SubstrateWeight<Runtime>;
9699
type Event = Event;

0 commit comments

Comments
 (0)