difftreelog
fix cargo fmt
in: master
6 files changed
pallets/configuration/src/lib.rsdiffbeforeafterboth--- a/pallets/configuration/src/lib.rs
+++ b/pallets/configuration/src/lib.rs
@@ -43,7 +43,8 @@
use super::*;
use frame_support::{
traits::{Get, ReservableCurrency, Currency},
- pallet_prelude::{StorageValue, ValueQuery, DispatchResult, IsType}, log,
+ pallet_prelude::{StorageValue, ValueQuery, DispatchResult, IsType},
+ log,
};
use frame_system::{pallet_prelude::OriginFor, ensure_root, Config as SystemConfig};
runtime/common/tests/mod.rsdiffbeforeafterboth--- a/runtime/common/tests/mod.rs
+++ b/runtime/common/tests/mod.rs
@@ -40,7 +40,13 @@
}
fn last_events(n: usize) -> Vec<RuntimeEvent> {
- System::events().into_iter().map(|e| e.event).rev().take(n).rev().collect()
+ System::events()
+ .into_iter()
+ .map(|e| e.event)
+ .rev()
+ .take(n)
+ .rev()
+ .collect()
}
fn new_test_ext(balances: Vec<(AccountId, Balance)>) -> sp_io::TestExternalities {
@@ -50,9 +56,9 @@
.assimilate_storage(&mut storage)
.unwrap();
- let mut ext = sp_io::TestExternalities::new(storage);
- ext.execute_with(|| System::set_block_number(1));
- ext
+ let mut ext = sp_io::TestExternalities::new(storage);
+ ext.execute_with(|| System::set_block_number(1));
+ ext
}
#[cfg(feature = "collator-selection")]
runtime/common/tests/xcm.rsdiffbeforeafterboth161617use xcm::{17use xcm::{18 VersionedXcm,18 VersionedXcm,19 latest::{prelude::*, Error}19 latest::{prelude::*, Error},20};20};21use codec::Encode;21use codec::Encode;22use crate::{Runtime, RuntimeCall, RuntimeOrigin, RuntimeEvent, PolkadotXcm};22use crate::{Runtime, RuntimeCall, RuntimeOrigin, RuntimeEvent, PolkadotXcm};23use super::{new_test_ext, last_events, AccountId};23use super::{new_test_ext, last_events, AccountId};24use frame_support::{24use frame_support::{pallet_prelude::Weight};25 pallet_prelude::Weight,26};272528const ALICE: AccountId = AccountId::new([0u8; 32]);26const ALICE: AccountId = AccountId::new([0u8; 32]);29const BOB: AccountId = AccountId::new([1u8; 32]);27const BOB: AccountId = AccountId::new([1u8; 32]);302831const INITIAL_BALANCE: u128 = 1000000000000000000_0000; // 1000 UNQ 29const INITIAL_BALANCE: u128 = 1000000000000000000_0000; // 1000 UNQ323033#[test]31#[test]34pub fn xcm_transact_is_forbidden() {32pub fn xcm_transact_is_forbidden() {54 match xcm_event {53 match xcm_event {55 RuntimeEvent::PolkadotXcm(54 RuntimeEvent::PolkadotXcm(pallet_xcm::Event::<Runtime>::Attempted(56 pallet_xcm::Event::<Runtime>::Attempted(57 Outcome::Incomplete(_weight, Error::NoPermission)55 Outcome::Incomplete(_weight, Error::NoPermission),58 )56 )) => { /* Pass */ }59 ) => { /* Pass */ },60 _ => panic!(57 _ => panic!(61 "Expected PolkadotXcm.Attempted(Incomplete(_weight, NoPermission)),\58 "Expected PolkadotXcm.Attempted(Incomplete(_weight, NoPermission)),\62 found: {xcm_event:#?}"59 found: {xcm_event:#?}"63 )60 ),64 }61 }65 });62 });66}63}runtime/opal/src/xcm_barrier.rsdiffbeforeafterboth--- a/runtime/opal/src/xcm_barrier.rs
+++ b/runtime/opal/src/xcm_barrier.rs
@@ -17,7 +17,4 @@
use frame_support::traits::Everything;
use xcm_builder::{AllowTopLevelPaidExecutionFrom, TakeWeightCredit};
-pub type Barrier = (
- TakeWeightCredit,
- AllowTopLevelPaidExecutionFrom<Everything>,
-);
+pub type Barrier = (TakeWeightCredit, AllowTopLevelPaidExecutionFrom<Everything>);
runtime/quartz/src/xcm_barrier.rsdiffbeforeafterboth--- a/runtime/quartz/src/xcm_barrier.rs
+++ b/runtime/quartz/src/xcm_barrier.rs
@@ -14,10 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-use frame_support::{
- match_types,
- traits::Everything,
-};
+use frame_support::{match_types, traits::Everything};
use xcm::latest::{Junctions::*, MultiLocation};
use xcm_builder::{
AllowKnownQueryResponses, AllowSubscriptionsFrom, TakeWeightCredit,
runtime/unique/src/xcm_barrier.rsdiffbeforeafterboth--- a/runtime/unique/src/xcm_barrier.rs
+++ b/runtime/unique/src/xcm_barrier.rs
@@ -14,10 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-use frame_support::{
- match_types,
- traits::Everything,
-};
+use frame_support::{match_types, traits::Everything};
use xcm::latest::{Junctions::*, MultiLocation};
use xcm_builder::{
AllowKnownQueryResponses, AllowSubscriptionsFrom, TakeWeightCredit,