git.delta.rocks / unique-network / refs/commits / 3ba14ab26c19

difftreelog

fix cargo fmt

Daniel Shiposha2023-03-27parent: #4e84fdd.patch.diff
in: master

6 files changed

modifiedpallets/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};
 
modifiedruntime/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")]
modifiedruntime/common/tests/xcm.rsdiffbeforeafterboth
1616
17use 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};
2725
28const 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]);
3028
31const INITIAL_BALANCE: u128 = 1000000000000000000_0000; // 1000 UNQ 29const INITIAL_BALANCE: u128 = 1000000000000000000_0000; // 1000 UNQ
3230
33#[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}
modifiedruntime/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>);
modifiedruntime/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,
modifiedruntime/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,