Skip to content

feat: api fungibles pallet #131

feat: api fungibles pallet

feat: api fungibles pallet #131

GitHub Actions / clippy failed Jul 21, 2024 in 1s

clippy

1 error, 11 warnings

Details

Results

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

Versions

  • rustc 1.79.0 (129f3b996 2024-06-10)
  • cargo 1.79.0 (ffa9cf99a 2024-06-03)
  • clippy 0.1.79 (129f3b9 2024-06-10)

Annotations

Check warning on line 340 in runtime/testnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

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.

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

Check warning on line 33 in runtime/testnet/src/extensions.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

bound is defined in more than one place

warning: bound is defined in more than one place
  --> runtime/testnet/src/extensions.rs:33:10
   |
33 |     fn call<E: Ext>(&mut self, env: Environment<E, InitState>) -> Result<RetVal, DispatchError>
   |             ^
34 |     where
35 |         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

Check failure on line 9 in runtime/testnet/src/extensions.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

failed to resolve: use of undeclared crate or module `pop_primitives`

error[E0433]: failed to resolve: use of undeclared crate or module `pop_primitives`
 --> runtime/testnet/src/extensions.rs:9:5
  |
9 | use pop_primitives::storage_keys::RuntimeStateKeys;
  |     ^^^^^^^^^^^^^^ use of undeclared crate or module `pop_primitives`
  |
help: there is a crate or module with a similar name
  |
9 | use primitives::storage_keys::RuntimeStateKeys;
  |     ~~~~~~~~~~

Check warning on line 983 in runtime/devnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u8` -> `u8`)

warning: casting to the same type is unnecessary (`u8` -> `u8`)
   --> runtime/devnet/src/lib.rs:983:3
    |
983 |         Fungibles(fungibles::Keys<T>) = FUNGIBLES,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `FUNGIBLES`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
    = note: `#[warn(clippy::unnecessary_cast)]` on by default

Check warning on line 32 in runtime/devnet/src/extensions/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constant `V0` is never used

warning: constant `V0` is never used
  --> runtime/devnet/src/extensions/mod.rs:32:7
   |
32 | const V0: u8 = 0;
   |       ^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 6 in runtime/devnet/src/extensions/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `approvals::Inspect`

warning: unused import: `approvals::Inspect`
 --> runtime/devnet/src/extensions/mod.rs:6:15
  |
6 |         fungibles::{approvals::Inspect as ApprovalInspect, metadata::Inspect as MetadataInspect},
  |                     ^^^^^^^^^^^^^^^^^^

Check warning on line 347 in runtime/devnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

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.

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:347:57
    |
347 |     type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
    |                                                            ^^^^^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

Check warning on line 52 in runtime/devnet/src/extensions/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

bound is defined in more than one place

warning: bound is defined in more than one place
  --> runtime/devnet/src/extensions/mod.rs:52:10
   |
52 |     fn call<E: Ext>(&mut self, env: Environment<E, InitState>) -> Result<RetVal, DispatchError>
   |             ^
53 |     where
54 |         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

Check warning on line 24 in runtime/devnet/src/extensions/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused imports: `Balance`, `Runtime`, `UNIT`

warning: unused imports: `Balance`, `Runtime`, `UNIT`
  --> runtime/devnet/src/extensions/mod.rs:24:30
   |
24 |     AccountId, AllowedApiCalls, Balance, Runtime, RuntimeCall, RuntimeOrigin, UNIT,
   |                                 ^^^^^^^  ^^^^^^^                              ^^^^

Check warning on line 6 in runtime/devnet/src/extensions/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `metadata::Inspect as MetadataInspect`

warning: unused import: `metadata::Inspect as MetadataInspect`
 --> runtime/devnet/src/extensions/mod.rs:6:54
  |
6 |         fungibles::{approvals::Inspect as ApprovalInspect, metadata::Inspect as MetadataInspect},
  |                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

Check warning on line 54 in scripts/fund-dev-accounts/./main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used a field initializer for a tuple struct

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

Check warning on line 57 in scripts/fund-dev-accounts/./main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used a field initializer for a tuple struct

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(<[_]>::into_vec(
53 +             // This rustc_box is not required, but it produces a dramatic improvement in compile
54 +             // time when constructing arrays with many elements.
55 +             #[rustc_box]
56 +             $crate::boxed::Box::new([$($x),+])
57 ~         )));
   |