Skip to content

feat: add ismp

feat: add ismp #126

GitHub Actions / clippy succeeded Mar 24, 2024 in 1s

clippy

11 warnings

Details

Results

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

Versions

  • rustc 1.77.0 (aedd173a2 2024-03-17)
  • cargo 1.77.0 (3fe68eabf 2024-02-29)
  • clippy 0.1.77 (aedd173 2024-03-17)

Annotations

Check warning on line 378 in node/src/service.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (15/7)

warning: this function has too many arguments (15/7)
   --> node/src/service.rs:362:1
    |
362 | / fn start_consensus(
363 | |     client: Arc<ParachainClient>,
364 | |     backend: Arc<ParachainBackend>,
365 | |     block_import: ParachainBlockImport,
...   |
377 | |     announce_block: Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,
378 | | ) -> Result<(), sc_service::Error> {
    | |__________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
    = note: `#[warn(clippy::too_many_arguments)]` on by default

Check warning on line 49 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),
8  | |
...  |
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 512 bytes
...  |
48 | |     Key(sc_cli::KeySubcommand),
49 | | }
   | |_^ the entire enum is at least 512 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 1032 in runtime/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `impl std::iter::Iterator<Item = std::boxed::Box<frame_system::EventRecord<<Runtime as frame_system::Config>::RuntimeEvent, <Runtime as frame_system::Config>::Hash>>>`

warning: useless conversion to the same type: `impl std::iter::Iterator<Item = std::boxed::Box<frame_system::EventRecord<<Runtime as frame_system::Config>::RuntimeEvent, <Runtime as frame_system::Config>::Hash>>>`
    --> runtime/src/lib.rs:1032:21
     |
1032 |             let raw_events = frame_system::Pallet::<Self>::read_events_no_consensus().into_iter();
     |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `frame_system::Pallet::<Self>::read_events_no_consensus()`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 1017 in runtime/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `impl std::iter::Iterator<Item = std::boxed::Box<frame_system::EventRecord<<Runtime as frame_system::Config>::RuntimeEvent, <Runtime as frame_system::Config>::Hash>>>`

warning: useless conversion to the same type: `impl std::iter::Iterator<Item = std::boxed::Box<frame_system::EventRecord<<Runtime as frame_system::Config>::RuntimeEvent, <Runtime as frame_system::Config>::Hash>>>`
    --> runtime/src/lib.rs:1017:21
     |
1017 |             let raw_events = frame_system::Pallet::<Self>::read_events_no_consensus().into_iter();
     |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `frame_system::Pallet::<Self>::read_events_no_consensus()`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 102 in runtime/src/ismp_config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> runtime/src/ismp_config.rs:102:26
    |
102 |         Ok(Box::new(ProxyModule::default()))
    |                                ^^^^^^^^^^^ help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
    = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default

Check warning on line 102 in runtime/src/ismp_config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`Box::new(_)` of default value

warning: `Box::new(_)` of default value
   --> runtime/src/ismp_config.rs:102:6
    |
102 |         Ok(Box::new(ProxyModule::default()))
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<ProxyModule>::default()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#box_default
    = note: `#[warn(clippy::box_default)]` on by default

Check warning on line 93 in runtime/src/ismp_config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this match could be replaced by its body itself

warning: this match could be replaced by its body itself
  --> runtime/src/ismp_config.rs:90:3
   |
90 | /         match pallet_id {
91 | |             // instead of returning an error, do nothing. The timeout is for a connected chain.
92 | |             _ => Ok(()),
93 | |         }
   | |_________^ help: consider using the match body instead: `Ok(())`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding

Check warning on line 78 in runtime/src/ismp_config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this match could be replaced by its body itself

warning: this match could be replaced by its body itself
  --> runtime/src/ismp_config.rs:76:3
   |
76 | /         match pallet_id {
77 | |             _ => Err(Error::ImplementationSpecific("Destination module not found".to_string())),
78 | |         }
   | |_________^ help: consider using the match body instead: `Err(Error::ImplementationSpecific("Destination module not found".to_string()))`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding

Check warning on line 59 in runtime/src/ismp_config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this match could be replaced by its body itself

warning: this match could be replaced by its body itself
  --> runtime/src/ismp_config.rs:57:3
   |
57 | /         match pallet_id {
58 | |             _ => Err(Error::ImplementationSpecific("Destination module not found".to_string())),
59 | |         }
   | |_________^ help: consider using the match body instead: `Err(Error::ImplementationSpecific("Destination module not found".to_string()))`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding
   = note: `#[warn(clippy::match_single_binding)]` on by default

Check warning on line 328 in runtime/src/extensions.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `cumulus_primitives_core::Location`

warning: useless conversion to the same type: `cumulus_primitives_core::Location`
   --> runtime/src/extensions.rs:328:35
    |
328 |                 .deposit_asset(assets.into(), beneficiary.into())
    |                                               ^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `beneficiary`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 321 in runtime/src/extensions.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `cumulus_primitives_core::Asset`

warning: useless conversion to the same type: `cumulus_primitives_core::Asset`
   --> runtime/src/extensions.rs:321:20
    |
321 |                 .buy_execution(assets.clone().into(), Unlimited)
    |                                ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `assets.clone()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `#[warn(clippy::useless_conversion)]` on by default