Skip to content

Commit

Permalink
fix: warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wischli committed Nov 1, 2023
1 parent 835a856 commit 9417558
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pallets/anchors/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use std::time::Instant;

use codec::Encode;
use frame_support::{assert_noop, assert_ok, pallet_prelude::Hooks, traits::Randomness};
use frame_support::{assert_noop, assert_ok};
use frame_system::ensure_signed;
use sp_core::H256;
use sp_runtime::traits::{BadOrigin, Hash, Header};
Expand Down
4 changes: 2 additions & 2 deletions pallets/bridge/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ use frame_system::{
mocking::{MockBlock, MockUncheckedExtrinsic},
EnsureNever, EnsureSignedBy,
};
use sp_core::{blake2_128, ConstU64, H256};
use sp_core::{blake2_128, H256};
use sp_io::TestExternalities;
use sp_runtime::{
testing::Header,
traits::{BlakeTwo256, ConstU128, IdentityLookup},
traits::{BlakeTwo256, IdentityLookup},
};

use crate::{self as pallet_bridge, Config as BridgePalletConfig};
Expand Down
2 changes: 1 addition & 1 deletion pallets/order-book/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use cfg_types::{
use frame_support::{
pallet_prelude::DispatchResult,
parameter_types,
traits::{ConstU32, ConstU64, GenesisBuild},
traits::{ConstU32, GenesisBuild},
};
use frame_system::EnsureRoot;
use orml_traits::{
Expand Down
1 change: 0 additions & 1 deletion pallets/order-book/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

use cfg_primitives::CFG;
use cfg_types::tokens::CurrencyId;
use frame_support::{
assert_err, assert_noop, assert_ok,
Expand Down
4 changes: 2 additions & 2 deletions pallets/permissions/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ mod dummy {

#[pallet::call]
impl<T: Config> Pallet<T> {
#[pallet::weight(100)]
#[pallet::weight({100})]
#[pallet::call_index(0)]
pub fn test_add(
origin: OriginFor<T>,
Expand All @@ -215,7 +215,7 @@ mod dummy {
Ok(())
}

#[pallet::weight(100)]
#[pallet::weight({100})]
#[pallet::call_index(1)]
pub fn test_rm(origin: OriginFor<T>, scope: T::Scope, role: T::Role) -> DispatchResult {
let who = ensure_signed(origin)?;
Expand Down
4 changes: 2 additions & 2 deletions pallets/pool-system/src/tranches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1947,7 +1947,7 @@ pub mod test {
let valid_tranche_id: TrancheId = [
59u8, 168, 10, 55, 120, 240, 78, 191, 69, 232, 6, 209, 154, 5, 32, 37,
];
let mut tranche = tranches
tranche = tranches
.get_mut_tranche(TrancheLoc::Id(valid_tranche_id))
.unwrap();

Expand Down Expand Up @@ -3568,7 +3568,7 @@ pub mod test {
#[test]
fn epoch_execution_residual_tranche_mut_works() {
let mut epoch_tranches = default_epoch_tranches();
let mut epoch_tranche = epoch_tranches.residual_tranche_mut().unwrap();
let epoch_tranche = epoch_tranches.residual_tranche_mut().unwrap();
epoch_tranche.invest = 200;

assert_eq!(epoch_tranche.invest, 200)
Expand Down
6 changes: 1 addition & 5 deletions runtime/common/src/tests/mock.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
use cfg_primitives::AccountId;
use frame_support::{
parameter_types,
traits::{ConstU32, FindAuthor},
PalletId,
};
use frame_support::{parameter_types, traits::FindAuthor, PalletId};
use sp_core::{ConstU64, H256};
use sp_io::TestExternalities;
use sp_runtime::{
Expand Down

0 comments on commit 9417558

Please sign in to comment.