Skip to content

Commit

Permalink
fmt: Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cdamian committed Jun 20, 2024
1 parent 984ed0e commit d4d20e3
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 38 deletions.
6 changes: 2 additions & 4 deletions pallets/anchors-v2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@
// GNU General Public License for more details.
#![cfg_attr(not(feature = "std"), no_std)]

use frame_support::pallet_prelude::*;
use frame_support::traits::ReservableCurrency;
use frame_support::{pallet_prelude::*, traits::ReservableCurrency};
use frame_system::pallet_prelude::*;
use scale_info::TypeInfo;

pub use pallet::*;
use scale_info::TypeInfo;
pub use weights::*;

#[cfg(feature = "runtime-benchmarks")]
Expand Down
9 changes: 3 additions & 6 deletions pallets/anchors-v2/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

use frame_support::{assert_err, assert_ok};
use frame_support::dispatch::RawOrigin;
use frame_support::{assert_err, assert_ok, dispatch::RawOrigin};
use pallet_balances::Error::InsufficientBalance;
use sp_runtime::DispatchError::BadOrigin;
use sp_runtime::testing::H256;

use crate::mock::{*, RuntimeEvent as MockEvent};
use sp_runtime::{testing::H256, DispatchError::BadOrigin};

use super::*;
use crate::mock::{RuntimeEvent as MockEvent, *};

mod set_anchor {
use super::*;
Expand Down
2 changes: 2 additions & 0 deletions pallets/anchors-v2/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ impl WeightInfo for () {
fn set_anchor() -> Weight {
Weight::zero()
}

fn remove_anchor() -> Weight {
Weight::zero()
}

fn set_deposit_value() -> Weight {
Weight::zero()
}
Expand Down
3 changes: 1 addition & 2 deletions pallets/pool-system/src/pool_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

use cfg_traits::Seconds;
use cfg_types::{epoch::EpochState, pools::TrancheMetadata};
pub use changes::PoolChangeProposal;
use frame_support::{
dispatch::DispatchResult,
pallet_prelude::{DispatchError, RuntimeDebug},
Expand Down Expand Up @@ -419,5 +420,3 @@ pub mod changes {
pub change: ChangeProposal,
}
}

pub use changes::PoolChangeProposal;
1 change: 0 additions & 1 deletion pallets/pool-system/src/tranches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,6 @@ pub mod test {
}

mod tranche {

use super::*;

#[test]
Expand Down
26 changes: 13 additions & 13 deletions runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,6 @@
#![cfg_attr(not(feature = "std"), no_std)]

pub mod account_conversion;
pub mod apis;
pub mod changes;
pub mod evm;
pub mod fees;
pub mod gateway;
pub mod migrations;
pub mod oracle;
pub mod pool;
pub mod remarks;
pub mod transfer_filter;
pub mod xcm;

use cfg_primitives::Balance;
use cfg_types::{
fee_keys::FeeKey,
Expand All @@ -44,6 +31,19 @@ use sp_runtime::{
};
use sp_std::marker::PhantomData;

pub mod account_conversion;
pub mod apis;
pub mod changes;
pub mod evm;
pub mod fees;
pub mod gateway;
pub mod migrations;
pub mod oracle;
pub mod pool;
pub mod remarks;
pub mod transfer_filter;
pub mod xcm;

pub mod instances {
/// The rewards associated to block rewards
pub type BlockRewards = pallet_rewards::Instance1;
Expand Down
21 changes: 9 additions & 12 deletions runtime/integration-tests/src/generic/cases/liquidity_pools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ use staging_xcm::{
},
VersionedAsset, VersionedAssets, VersionedLocation,
};
use utils::*;

use crate::{
generic::{
Expand Down Expand Up @@ -211,9 +212,9 @@ pub mod utils {
}
}

use utils::*;

mod development {
use utils::*;

use super::*;

pub const GLMR_CURRENCY_ID: CurrencyId = CurrencyId::ForeignAsset(4);
Expand Down Expand Up @@ -798,8 +799,6 @@ mod development {
}
}

use utils::*;

mod add_allow_upgrade {
use cfg_types::tokens::LiquidityPoolsWrappedToken;

Expand Down Expand Up @@ -4528,6 +4527,8 @@ mod development {
}

mod ethereum_xcm {
use utils::*;

use super::*;

mod utils {
Expand Down Expand Up @@ -4667,8 +4668,6 @@ mod development {
}
}

use utils::*;

const TEST_DOMAIN: Domain = Domain::EVM(1);

#[test_runtimes([development])]
Expand Down Expand Up @@ -4873,11 +4872,12 @@ mod development {

mod altair {
use altair_runtime::{xcm::CurrencyIdConvert, PoolPalletIndex};

pub const KSM_ASSET_ID: CurrencyId = CurrencyId::ForeignAsset(1000);
use utils::*;

use super::*;

pub const KSM_ASSET_ID: CurrencyId = CurrencyId::ForeignAsset(1000);

mod utils {
use super::*;

Expand Down Expand Up @@ -4949,8 +4949,6 @@ mod altair {
}
}

use utils::*;

mod transfers {
use super::*;

Expand Down Expand Up @@ -5845,6 +5843,7 @@ mod altair {

mod centrifuge {
use centrifuge_runtime::xcm::CurrencyIdConvert;
use utils::*;

use super::*;

Expand Down Expand Up @@ -6120,8 +6119,6 @@ mod centrifuge {
}
}

use utils::*;

mod asset_registry {
use super::*;

Expand Down

0 comments on commit d4d20e3

Please sign in to comment.