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

Silence a few clippy warnings #629

Merged
merged 2 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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)]
simonsso marked this conversation as resolved.
Show resolved Hide resolved

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)]
simonsso marked this conversation as resolved.
Show resolved Hide resolved
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: 1 addition & 1 deletion runtimes/eden/src/pallets_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl pallet_balances::Config for Runtime {
}

parameter_types! {
pub const TransactionByteFee: Balance = 1 * constants::MICRO_NODL;
pub const TransactionByteFee: Balance = constants::MICRO_NODL;
pub const OperationalFeeMultiplier: u8 = 5;
pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(25);
pub AdjustmentVariable: Multiplier = Multiplier::saturating_from_rational(1, 100_000);
Expand Down
2 changes: 1 addition & 1 deletion runtimes/eden/src/pallets_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ parameter_types! {
pub const ClassDeposit: Balance = 10 * constants::NODL;
pub const InstanceDeposit: Balance = 100 * constants::MILLI_NODL;
pub const MetadataDepositBase: Balance = 10 * constants::NODL;
pub const MetadataDepositPerByte: Balance = 1 * constants::NODL;
pub const MetadataDepositPerByte: Balance = constants::NODL;
aliXsed marked this conversation as resolved.
Show resolved Hide resolved
pub const KeyLimit: u32 = 32;
pub const ValueLimit: u32 = 256;
pub const StringLimit: u32 = 50;
Expand Down