refactor: various improvements and fixes #243
clippy
168 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 168 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.80.1 (3f5fd8dd4 2024-08-06)
- cargo 1.80.1 (376290515 2024-07-16)
- clippy 0.1.80 (3f5fd8d 2024-08-06)
Annotations
Check warning on line 44 in node/src/cli.rs
github-actions / clippy
large size difference between variants
warning: large size difference between variants
--> node/src/cli.rs:5:1
|
5 | / pub enum Subcommand {
6 | | /// Build a chain specification.
7 | | BuildSpec(sc_cli::BuildSpecCmd),
... |
19 | | ImportBlocks(sc_cli::ImportBlocksCmd),
| | ------------------------------------- the second-largest variant contains at least 240 bytes
... |
39 | | Benchmark(frame_benchmarking_cli::BenchmarkCmd),
| | ----------------------------------------------- the largest variant contains at least 544 bytes
... |
43 | | Key(sc_cli::KeySubcommand),
44 | | }
| |_^ the entire enum is at least 544 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
= note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields to reduce the total size of the enum
|
39 | Benchmark(Box<frame_benchmarking_cli::BenchmarkCmd>),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check warning on line 852 in runtime/mainnet/src/lib.rs
github-actions / clippy
missing documentation for a function
warning: missing documentation for a function
--> runtime/mainnet/src/lib.rs:616:1
|
616 | / impl_runtime_apis! {
617 | |
618 | | impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
619 | | fn slot_duration() -> sp_consensus_aura::SlotDuration {
... |
851 | | }
852 | | }
| |_^
|
= note: this warning originates in the macro `impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 852 in runtime/mainnet/src/lib.rs
github-actions / clippy
missing documentation for a module
warning: missing documentation for a module
--> runtime/mainnet/src/lib.rs:616:1
|
616 | / impl_runtime_apis! {
617 | |
618 | | impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
619 | | fn slot_duration() -> sp_consensus_aura::SlotDuration {
... |
851 | | }
852 | | }
| |_^
|
= note: this warning originates in the macro `impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 852 in runtime/mainnet/src/lib.rs
github-actions / clippy
missing documentation for a constant
warning: missing documentation for a constant
--> runtime/mainnet/src/lib.rs:616:1
|
616 | / impl_runtime_apis! {
617 | |
618 | | impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
619 | | fn slot_duration() -> sp_consensus_aura::SlotDuration {
... |
851 | | }
852 | | }
| |_^
|
= note: this warning originates in the macro `impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 852 in runtime/mainnet/src/lib.rs
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:616:1
|
616 | / impl_runtime_apis! {
617 | |
618 | | impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
619 | | fn slot_duration() -> sp_consensus_aura::SlotDuration {
... |
851 | | }
852 | | }
| |_^
|
= note: this warning originates in the macro `impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 523 in runtime/mainnet/src/lib.rs
github-actions / clippy
missing documentation for an associated function
warning: missing documentation for an associated function
--> runtime/mainnet/src/lib.rs:523:1
|
523 | #[frame_support::runtime]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this warning originates in the attribute macro `frame_support::runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 523 in runtime/mainnet/src/lib.rs
github-actions / clippy
missing documentation for a type alias
warning: missing documentation for a type alias
--> runtime/mainnet/src/lib.rs:523:1
|
523 | #[frame_support::runtime]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this warning originates in the attribute macro `frame_support::runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 523 in runtime/mainnet/src/lib.rs
github-actions / clippy
missing documentation for a struct field
warning: missing documentation for a struct field
--> runtime/mainnet/src/lib.rs:523:1
|
523 | #[frame_support::runtime]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this warning originates in the attribute macro `frame_support::runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 523 in runtime/mainnet/src/lib.rs
github-actions / clippy
missing documentation for a variant
warning: missing documentation for a variant
--> runtime/mainnet/src/lib.rs:523:1
|
523 | #[frame_support::runtime]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this warning originates in the attribute macro `frame_support::runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 523 in runtime/mainnet/src/lib.rs
github-actions / clippy
missing documentation for an enum
warning: missing documentation for an enum
--> runtime/mainnet/src/lib.rs:523:1
|
523 | #[frame_support::runtime]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this warning originates in the attribute macro `frame_support::runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 523 in runtime/mainnet/src/lib.rs
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:523:1
|
523 | #[frame_support::runtime]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this warning originates in the attribute macro `frame_support::runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:498:1
|
498 | / parameter_types! {
499 | | // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes.
500 | | pub const DepositBase: Balance = deposit(1, 88);
501 | | // Additional storage item size of 32 bytes.
502 | | pub const DepositFactor: Balance = deposit(0, 32);
503 | | pub const MaxSignatories: u32 = 100;
504 | | }
| |_^
|
= note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:498:1
|
498 | / parameter_types! {
499 | | // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes.
500 | | pub const DepositBase: Balance = deposit(1, 88);
501 | | // Additional storage item size of 32 bytes.
502 | | pub const DepositFactor: Balance = deposit(0, 32);
503 | | pub const MaxSignatories: u32 = 100;
504 | | }
| |_^
|
= note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:498:1
|
498 | / parameter_types! {
499 | | // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes.
500 | | pub const DepositBase: Balance = deposit(1, 88);
501 | | // Additional storage item size of 32 bytes.
502 | | pub const DepositFactor: Balance = deposit(0, 32);
503 | | pub const MaxSignatories: u32 = 100;
504 | | }
| |_^
|
= note: this warning originates in the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:479:1
|
479 | / parameter_types! {
480 | | pub const PreimageHoldReason: RuntimeHoldReason = RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage);
481 | | pub const PreimageBaseDeposit: Balance = deposit(2, 64);
482 | | pub const PreimageByteDeposit: Balance = deposit(0, 1);
483 | | }
| |_^
|
= note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:479:1
|
479 | / parameter_types! {
480 | | pub const PreimageHoldReason: RuntimeHoldReason = RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage);
481 | | pub const PreimageBaseDeposit: Balance = deposit(2, 64);
482 | | pub const PreimageByteDeposit: Balance = deposit(0, 1);
483 | | }
| |_^
|
= note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:479:1
|
479 | / parameter_types! {
480 | | pub const PreimageHoldReason: RuntimeHoldReason = RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage);
481 | | pub const PreimageBaseDeposit: Balance = deposit(2, 64);
482 | | pub const PreimageByteDeposit: Balance = deposit(0, 1);
483 | | }
| |_^
|
= note: this warning originates in the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:458:1
|
458 | / parameter_types! {
459 | | pub MaximumSchedulerWeight: Weight = Perbill::from_percent(60) *
460 | | RuntimeBlockWeights::get().max_block;
461 | | }
| |_^
|
= note: this warning originates in the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:430:1
|
430 | / parameter_types! {
431 | | pub const PotId: PalletId = PalletId(*b"PotStake");
432 | | // StakingAdmin pluralistic body.
433 | | pub const StakingAdminBodyId: BodyId = BodyId::Defense;
434 | | }
| |_^
|
= note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:430:1
|
430 | / parameter_types! {
431 | | pub const PotId: PalletId = PalletId(*b"PotStake");
432 | | // StakingAdmin pluralistic body.
433 | | pub const StakingAdminBodyId: BodyId = BodyId::Defense;
434 | | }
| |_^
|
= note: this warning originates in the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:403:1
|
403 | / parameter_types! {
404 | | pub const Period: u32 = 6 * HOURS;
405 | | pub const Offset: u32 = 0;
406 | | }
| |_^
|
= note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:403:1
|
403 | / parameter_types! {
404 | | pub const Period: u32 = 6 * HOURS;
405 | | pub const Offset: u32 = 0;
406 | | }
| |_^
|
= note: this warning originates in the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:357:1
|
357 | / parameter_types! {
358 | | pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block;
359 | | pub MessageQueueIdleServiceWeight: Weight = Perbill::from_percent(20) * RuntimeBlockWeights::get().max_block;
360 | | }
| |_^
|
= note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:357:1
|
357 | / parameter_types! {
358 | | pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block;
359 | | pub MessageQueueIdleServiceWeight: Weight = Perbill::from_percent(20) * RuntimeBlockWeights::get().max_block;
360 | | }
| |_^
|
= note: this warning originates in the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> runtime/mainnet/src/lib.rs:328:1
|
328 | / parameter_types! {
329 | | pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);
330 | | pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);
331 | | pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent;
332 | | }
| |_^
|
= note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)