Skip to content

Commit

Permalink
Silence a few clippy warnings (#629)
Browse files Browse the repository at this point in the history
* Silence a few clippy warnings
* Deny warnings for mulitplication with one.
  • Loading branch information
simonsso committed Jul 11, 2022
1 parent 8835bfa commit ee44942
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#![allow(clippy::derive_partial_eq_without_eq)]

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

/// The extensions for the [`ChainSpec`].
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]
#[serde(rename_all = "camelCase")]
pub struct Extensions {
/// The relay chain of the Parachain.
Expand Down
2 changes: 2 additions & 0 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ type HostFunctions = (
///
/// Use this macro if you don't actually need the full service, but just the builder in order to
/// be able to perform chain operations.
#[allow(clippy::type_complexity)]
pub fn new_partial<RuntimeApi, BIQ>(
config: &Configuration,
build_import_queue: BIQ,
Expand Down Expand Up @@ -357,6 +358,7 @@ where
}

/// Build the import queue for the rococo parachain runtime.
#[allow(clippy::type_complexity)]
pub fn parachain_build_import_queue(
client: Arc<TFullClient<Block, runtime_eden::RuntimeApi, WasmExecutor<HostFunctions>>>,
config: &Configuration,
Expand Down
1 change: 1 addition & 0 deletions pallets/mandate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ pub mod pallet {
#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}

#[allow(clippy::boxed_local)]
#[pallet::call]
impl<T: Config> Pallet<T> {
/// Let the configured origin dispatch a call as root
Expand Down
1 change: 1 addition & 0 deletions pallets/reserve/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ pub mod pallet {
Ok(().into())
}

#[allow(clippy::boxed_local)]
/// Dispatch a call as coming from the reserve account
#[pallet::weight({
let dispatch_info = call.get_dispatch_info();
Expand Down
1 change: 1 addition & 0 deletions pallets/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,7 @@ pub mod pallet {
#[pallet::getter(fn bonded_sessions)]
pub(crate) type BondedSessions<T: Config> = StorageValue<_, Vec<SessionIndex>, ValueQuery>;

#[allow(clippy::type_complexity)]
#[pallet::genesis_config]
pub struct GenesisConfig<T: Config> {
pub stakers: Vec<(T::AccountId, Option<T::AccountId>, BalanceOf<T>)>,
Expand Down
2 changes: 2 additions & 0 deletions runtimes/eden/src/pallets_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#![allow(clippy::identity_op)]

use crate::{
constants, implementations::DealWithFees, version::VERSION, Balances, Call, CompanyReserve, Event, Origin,
PalletInfo, Runtime, SignedExtra, SignedPayload, System, UncheckedExtrinsic,
Expand Down
3 changes: 3 additions & 0 deletions runtimes/eden/src/pallets_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#![allow(clippy::identity_op)]

use crate::{
constants, implementations::RelayChainBlockNumberProvider, pallets_governance::MoreThanHalfOfTechComm, Balances,
Call, Event, Origin, OriginCaller, Preimage, Runtime,
Expand Down Expand Up @@ -91,6 +93,7 @@ parameter_types! {
pub const PreimageByteDeposit: Balance = constants::deposit(0, 1);
}

#[allow(clippy::identity_op)]
impl pallet_preimage::Config for Runtime {
type WeightInfo = pallet_preimage::weights::SubstrateWeight<Runtime>;
type Event = Event;
Expand Down

0 comments on commit ee44942

Please sign in to comment.