Skip to content

Commit 3522228

Browse files
committed
🔧 chore(mock.rs): remove unused imports and types
🔧 chore(tests.rs): remove unused Preservation variant In the `mock.rs` file of the `afloat` pallet, the `UncheckedExtrinsic` type is no longer used, so it has been removed. This improves code readability and reduces unnecessary code. In the `tests.rs` file of the `fund-admin` pallet, the `Preservation::Protect` variant is no longer used, so it has been removed. This simplifies the code and removes unnecessary options. In the `mock.rs` file of the `gated-marketplace` pallet, unused imports and types (`RawOrigin`, `Lookup`, `AccountId`, `AccountId32`, `ApplyExtrinsicResult`, `MultiSignature`, `Percent`, `TransactionSource`, `TransactionValidity`, `BlockT`, `IdentifyAccount`, `Verify`, `NumberFor`, `AccountIdLookup`, `impl_opaque_keys`, `
1 parent ed1b78b commit 3522228

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

‎pallets/afloat/src/mock.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use sp_runtime::{
99
traits::{BlakeTwo256, IdentityLookup},
1010
BuildStorage,
1111
};
12-
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
1312
type Block = frame_system::mocking::MockBlock<Test>;
1413
use frame_system::EnsureRoot;
1514
use system::EnsureSigned;

‎pallets/fund-admin/src/tests.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use frame_support::{
1010
traits::{
1111
tokens::{
1212
fungible::Mutate,
13-
Preservation::{Expendable, Preserve, Protect},
13+
Preservation::{Expendable},
1414
},
1515
ConstU32,
1616
},

‎pallets/gated-marketplace/src/mock.rs‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
use crate as pallet_gated_marketplace;
2-
use frame_system::RawOrigin;
3-
use sp_runtime::traits::Lookup;
42

53
use frame_support::{
64
parameter_types,
@@ -13,14 +11,8 @@ use sp_runtime::traits::{BlakeTwo256, IdentityLookup};
1311
pub type Balance = u128;
1412
type Block = frame_system::mocking::MockBlock<Test>;
1513
use frame_system::EnsureRoot;
16-
use sp_runtime::{
17-
create_runtime_str, generic, impl_opaque_keys,
18-
traits::{AccountIdLookup, Block as BlockT, IdentifyAccount, NumberFor, Verify},
19-
transaction_validity::{TransactionSource, TransactionValidity},
20-
AccountId32, ApplyExtrinsicResult, BuildStorage, MultiSignature, Percent,
21-
};
14+
use sp_runtime::BuildStorage;
2215
use system::EnsureSigned;
23-
type AccountId = u64;
2416
type AssetId = u32;
2517
// Configure a mock runtime to test the pallet.
2618
frame_support::construct_runtime!(

0 commit comments

Comments
 (0)