Skip to content

refactor: test check_approval #1096

refactor: test check_approval

refactor: test check_approval #1096

GitHub Actions / clippy succeeded Dec 10, 2024 in 4s

clippy

239 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 239
Note 0
Help 0

Versions

  • rustc 1.83.0 (90b35a623 2024-11-26)
  • cargo 1.83.0 (5ffbef321 2024-10-29)
  • clippy 0.1.83 (90b35a6 2024-11-26)

Annotations

Check warning on line 44 in node/src/cli.rs

See this annotation in the file changed.

@github-actions 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 916 in runtime/mainnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a function

warning: missing documentation for a function
   --> runtime/mainnet/src/lib.rs:680:1
    |
680 | / impl_runtime_apis! {
681 | |
682 | |     impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
683 | |         fn slot_duration() -> sp_consensus_aura::SlotDuration {
...   |
915 | |     }
916 | | }
    | |_^
    |
    = 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 136 in runtime/mainnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a constant

warning: missing documentation for a constant
   --> runtime/mainnet/src/lib.rs:136:2
    |
136 |     pub const MILLICENTS: Balance = CENTS / 1_000; // 100_000
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 135 in runtime/mainnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a constant

warning: missing documentation for a constant
   --> runtime/mainnet/src/lib.rs:135:2
    |
135 |     pub const CENTS: Balance = MILLIUNIT * 10; // 100_000_000
    |     ^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 124 in runtime/mainnet/src/config/xcm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
   --> runtime/mainnet/src/config/xcm.rs:124:1
    |
124 | pub struct XcmConfig;
    | ^^^^^^^^^^^^^^^^^^^^

Check warning on line 117 in runtime/mainnet/src/config/xcm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a type alias

warning: missing documentation for a type alias
   --> runtime/mainnet/src/config/xcm.rs:117:1
    |
117 | pub type TrustedReserves = (NativeAsset, NativeAssetFrom<AssetHub>);
    | ^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 93 in runtime/mainnet/src/config/xcm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a type alias

warning: missing documentation for a type alias
  --> runtime/mainnet/src/config/xcm.rs:93:1
   |
93 | pub type Barrier = TrailingSetTopicAsId<(
   | ^^^^^^^^^^^^^^^^

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/mainnet/src/config/xcm.rs:86:1
   |
86 | / parameter_types! {
87 | |     // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
88 | |     pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024);
89 | |     pub const MaxInstructions: u32 = 100;
90 | |     pub const MaxAssetsIntoHolding: u32 = 64;
91 | | }
   | |_^
   |
   = 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)

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/mainnet/src/config/xcm.rs:86:1
   |
86 | / parameter_types! {
87 | |     // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
88 | |     pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024);
89 | |     pub const MaxInstructions: u32 = 100;
90 | |     pub const MaxAssetsIntoHolding: u32 = 64;
91 | | }
   | |_^
   |
   = 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)

Check warning on line 277 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/mainnet/src/config/xcm.rs:86:1
   |
86 | / parameter_types! {
87 | |     // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
88 | |     pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024);
89 | |     pub const MaxInstructions: u32 = 100;
90 | |     pub const MaxAssetsIntoHolding: u32 = 64;
91 | | }
   | |_^
   |
   = note: this warning originates in the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 277 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/mainnet/src/config/xcm.rs:31:1
   |
31 | / parameter_types! {
32 | |     pub const RelayLocation: Location = Location::parent();
33 | |     pub AssetHub: Location = Location::new(1, [Parachain(1000)]);
34 | |     pub const RelayNetwork: Option<NetworkId> = Some(Polkadot);
35 | |     pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
36 | |     pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().int...
37 | | }
   | |_^
   |
   = 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)

Check warning on line 277 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/mainnet/src/config/xcm.rs:31:1
   |
31 | / parameter_types! {
32 | |     pub const RelayLocation: Location = Location::parent();
33 | |     pub AssetHub: Location = Location::new(1, [Parachain(1000)]);
34 | |     pub const RelayNetwork: Option<NetworkId> = Some(Polkadot);
35 | |     pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
36 | |     pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().int...
37 | | }
   | |_^
   |
   = 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)

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/mainnet/src/config/xcm.rs:31:1
   |
31 | / parameter_types! {
32 | |     pub const RelayLocation: Location = Location::parent();
33 | |     pub AssetHub: Location = Location::new(1, [Parachain(1000)]);
34 | |     pub const RelayNetwork: Option<NetworkId> = Some(Polkadot);
35 | |     pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
36 | |     pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().int...
37 | | }
   | |_^
   |
   = 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)

Check warning on line 277 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/mainnet/src/config/xcm.rs:31:1
   |
31 | / parameter_types! {
32 | |     pub const RelayLocation: Location = Location::parent();
33 | |     pub AssetHub: Location = Location::new(1, [Parachain(1000)]);
34 | |     pub const RelayNetwork: Option<NetworkId> = Some(Polkadot);
35 | |     pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
36 | |     pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().int...
37 | | }
   | |_^
   |
   = 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)

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/mainnet/src/config/xcm.rs:31:1
   |
31 | / parameter_types! {
32 | |     pub const RelayLocation: Location = Location::parent();
33 | |     pub AssetHub: Location = Location::new(1, [Parachain(1000)]);
34 | |     pub const RelayNetwork: Option<NetworkId> = Some(Polkadot);
35 | |     pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
36 | |     pub UniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().int...
37 | | }
   | |_^
   |
   = note: this warning originates in the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 2 in runtime/mainnet/src/config/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a module

warning: missing documentation for a module
 --> runtime/mainnet/src/config/mod.rs:2:1
  |
2 | pub mod xcm;
  | ^^^^^^^^^^^

Check warning on line 916 in runtime/mainnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a module

warning: missing documentation for a module
   --> runtime/mainnet/src/lib.rs:680:1
    |
680 | / impl_runtime_apis! {
681 | |
682 | |     impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
683 | |         fn slot_duration() -> sp_consensus_aura::SlotDuration {
...   |
915 | |     }
916 | | }
    | |_^
    |
    = 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 916 in runtime/mainnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a constant

warning: missing documentation for a constant
   --> runtime/mainnet/src/lib.rs:680:1
    |
680 | / impl_runtime_apis! {
681 | |
682 | |     impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
683 | |         fn slot_duration() -> sp_consensus_aura::SlotDuration {
...   |
915 | |     }
916 | | }
    | |_^
    |
    = 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 889 in runtime/mainnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

non-local `impl` definition, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> runtime/mainnet/src/lib.rs:889:4
    |
871 | /         fn dispatch_benchmark(
872 | |             config: frame_benchmarking::BenchmarkConfig
873 | |         ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
    | |_______________________________________________________________________________________- move the `impl` block outside of this associated function `dispatch_benchmark`
...
889 |               impl cumulus_pallet_session_benchmarking::Config for Runtime {}
    |               ^^^^^-------------------------------------------^^^^^-------
    |                    |                                               |
    |                    |                                               `Runtime` is not local
    |                    `Config` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`

Check warning on line 877 in runtime/mainnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

non-local `impl` definition, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
   --> runtime/mainnet/src/lib.rs:877:4
    |
871 | /         fn dispatch_benchmark(
872 | |             config: frame_benchmarking::BenchmarkConfig
873 | |         ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
    | |_______________________________________________________________________________________- move the `impl` block outside of this associated function `dispatch_benchmark`
...
877 |               impl frame_system_benchmarking::Config for Runtime {
    |               ^^^^^---------------------------------^^^^^-------
    |                    |                                     |
    |                    |                                     `Runtime` is not local
    |                    `Config` is not local
    |
    = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
    = note: `#[warn(non_local_definitions)]` on by default

Check warning on line 916 in runtime/mainnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
   --> runtime/mainnet/src/lib.rs:680:1
    |
680 | / impl_runtime_apis! {
681 | |
682 | |     impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
683 | |         fn slot_duration() -> sp_consensus_aura::SlotDuration {
...   |
915 | |     }
916 | | }
    | |_^
    |
    = 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 587 in runtime/mainnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for an associated function

warning: missing documentation for an associated function
   --> runtime/mainnet/src/lib.rs:587:1
    |
587 | #[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 587 in runtime/mainnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a type alias

warning: missing documentation for a type alias
   --> runtime/mainnet/src/lib.rs:587:1
    |
587 | #[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 587 in runtime/mainnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct field

warning: missing documentation for a struct field
   --> runtime/mainnet/src/lib.rs:587:1
    |
587 | #[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 587 in runtime/mainnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a variant

warning: missing documentation for a variant
   --> runtime/mainnet/src/lib.rs:587:1
    |
587 | #[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)