Skip to content

refactor: generic extension crate to de-duplicate code between runtimes #454

refactor: generic extension crate to de-duplicate code between runtimes

refactor: generic extension crate to de-duplicate code between runtimes #454

Triggered via pull request August 7, 2024 16:52
@chungquantinchungquantin
synchronize #163
Status Success
Total duration 10s
Artifacts

lint-pr.yml

on: pull_request_target
Validate PR title for conventional commit compliance
2s
Validate PR title for conventional commit compliance
Fit to window
Zoom out
Zoom in

Annotations

11 warnings
the borrowed expression implements the required traits: scripts/fund-dev-accounts/./main.rs#L177
warning: the borrowed expression implements the required traits --> scripts/fund-dev-accounts/./main.rs:177:47 | 177 | let query = pop::storage().system().account(&account.public_key().0.into()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `account.public_key().0.into()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
used a field initializer for a tuple struct: scripts/fund-dev-accounts/./main.rs#L54
warning: used a field initializer for a tuple struct --> scripts/fund-dev-accounts/./main.rs:54:9 | 54 | id: AssetId { 0: Location { parents: 0, interior: Junctions::Here } }, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `AssetId(Location { parents: 0, interior: Junctions::Here })` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields
used a field initializer for a tuple struct: scripts/fund-dev-accounts/./main.rs#L52
warning: used a field initializer for a tuple struct --> scripts/fund-dev-accounts/./main.rs:52:36 | 52 | let assets = VersionedAssets::V4(Assets { | __________________________________________^ 53 | | 0: vec![Asset { 54 | | id: AssetId { 0: Location { parents: 0, interior: Junctions::Here } }, 55 | | fun: amount, 56 | | }], 57 | | }); | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields = note: `#[warn(clippy::init_numbered_fields)]` on by default help: try | 52 ~ let assets = VersionedAssets::V4(Assets(vec![Asset { 53 ~ id: AssetId { 0: Location { parents: 0, interior: Junctions::Here } }, 54 ~ fun: amount, 55 ~ }])); |
large size difference between variants: node/src/cli.rs#L5
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 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>), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
use of deprecated struct `pallet_transaction_payment::CurrencyAdapter`: Please use the fungible trait and FungibleAdapter. This struct will be removed some time after March 2024.: runtime/testnet/src/lib.rs#L340
warning: use of deprecated struct `pallet_transaction_payment::CurrencyAdapter`: Please use the fungible trait and FungibleAdapter. This struct will be removed some time after March 2024. --> runtime/testnet/src/lib.rs:340:57 | 340 | type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>; | ^^^^^^^^^^^^^^^ | = note: `#[warn(deprecated)]` on by default
bound is defined in more than one place: runtime/testnet/src/extensions.rs#L32
warning: bound is defined in more than one place --> runtime/testnet/src/extensions.rs:32:10 | 32 | fn call<E: Ext>(&mut self, env: Environment<E, InitState>) -> Result<RetVal, DispatchError> | ^ 33 | where 34 | E: Ext<T = T>, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations = note: `#[warn(clippy::multiple_bound_locations)]` on by default
use of deprecated struct `pallet_transaction_payment::CurrencyAdapter`: Please use the fungible trait and FungibleAdapter. This struct will be removed some time after March 2024.: runtime/devnet/src/lib.rs#L334
warning: use of deprecated struct `pallet_transaction_payment::CurrencyAdapter`: Please use the fungible trait and FungibleAdapter. This struct will be removed some time after March 2024. --> runtime/devnet/src/lib.rs:334:57 | 334 | type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>; | ^^^^^^^^^^^^^^^ | = note: `#[warn(deprecated)]` on by default
unused import: `sp_runtime::BuildStorage`: runtime/devnet/src/config/extension.rs#L14
warning: unused import: `sp_runtime::BuildStorage` --> runtime/devnet/src/config/extension.rs:14:5 | 14 | use sp_runtime::BuildStorage; | ^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `Encode`: runtime/devnet/src/config/extension.rs#L6
warning: unused import: `Encode` --> runtime/devnet/src/config/extension.rs:6:21 | 6 | use codec::{Decode, Encode}; | ^^^^^^
unused imports: `Assets` and `System`: runtime/devnet/src/config/extension.rs#L4
warning: unused imports: `Assets` and `System` --> runtime/devnet/src/config/extension.rs:4:2 | 4 | Assets, Runtime, System, | ^^^^^^ ^^^^^^ | = note: `#[warn(unused_imports)]` on by default
bound is defined in more than one place: runtime/extension/src/lib.rs#L78
warning: bound is defined in more than one place --> runtime/extension/src/lib.rs:78:10 | 78 | fn call<E: Ext>(&mut self, env: Environment<E, InitState>) -> Result<RetVal, DispatchError> | ^ 79 | where 80 | E: Ext<T = T>, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations = note: `#[warn(clippy::multiple_bound_locations)]` on by default