git.delta.rocks / unique-network / refs/commits / b88274c6db1b

difftreelog

fix cargo fmt

Daniel Shiposha2022-09-28parent: #3deec63.patch.diff
in: master

7 files changed

modifiedcrates/evm-coder/src/execution.rsdiffbeforeafterboth
--- a/crates/evm-coder/src/execution.rs
+++ b/crates/evm-coder/src/execution.rs
@@ -60,12 +60,16 @@
 }
 impl From<u64> for DispatchInfo {
 	fn from(weight: u64) -> Self {
-		Self { weight: Weight::from_ref_time(weight) }
+		Self {
+			weight: Weight::from_ref_time(weight),
+		}
 	}
 }
 impl From<()> for DispatchInfo {
 	fn from(_: ()) -> Self {
-		Self { weight: Weight::zero() }
+		Self {
+			weight: Weight::zero(),
+		}
 	}
 }
 
modifiednode/cli/src/service.rsdiffbeforeafterboth
--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -327,7 +327,7 @@
 				Arc::new(RelayChainRpcInterface::new(rpc_client)) as Arc<_>,
 				None,
 			))
-		},
+		}
 		None => build_inprocess_relay_chain(
 			polkadot_config,
 			parachain_config,
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -185,25 +185,21 @@
 	/// Consume gas for reading.
 	pub fn consume_store_reads(&self, reads: u64) -> evm_coder::execution::Result<()> {
 		self.recorder
-			.consume_gas(T::GasWeightMapping::weight_to_gas(
-				Weight::from_ref_time(
-					<T as frame_system::Config>::DbWeight::get()
-						.read
-						.saturating_mul(reads)
-				),
-			))
+			.consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_ref_time(
+				<T as frame_system::Config>::DbWeight::get()
+					.read
+					.saturating_mul(reads),
+			)))
 	}
 
 	/// Consume gas for writing.
 	pub fn consume_store_writes(&self, writes: u64) -> evm_coder::execution::Result<()> {
 		self.recorder
-			.consume_gas(T::GasWeightMapping::weight_to_gas(
-				Weight::from_ref_time(
-					<T as frame_system::Config>::DbWeight::get()
-						.write
-						.saturating_mul(writes)
-				),
-			))
+			.consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_ref_time(
+				<T as frame_system::Config>::DbWeight::get()
+					.write
+					.saturating_mul(writes),
+			)))
 	}
 
 	/// Consume gas for reading and writing.
@@ -216,9 +212,9 @@
 		let reads = weight.read.saturating_mul(reads);
 		let writes = weight.read.saturating_mul(writes);
 		self.recorder
-			.consume_gas(T::GasWeightMapping::weight_to_gas(
-				Weight::from_ref_time(reads.saturating_add(writes)),
-			))
+			.consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_ref_time(
+				reads.saturating_add(writes),
+			)))
 	}
 
 	/// Save collection to storage.
modifiedpallets/refungible/src/lib.rsdiffbeforeafterboth

no syntactic changes

modifiedruntime/common/config/xcm/nativeassets.rsdiffbeforeafterboth
--- a/runtime/common/config/xcm/nativeassets.rs
+++ b/runtime/common/config/xcm/nativeassets.rs
@@ -23,8 +23,7 @@
 use xcm::latest::{
 	AssetId::{Concrete},
 	Fungibility::Fungible as XcmFungible,
-	MultiAsset, Error as XcmError,
-	Weight,
+	MultiAsset, Error as XcmError, Weight,
 };
 use xcm_builder::{CurrencyAdapter, NativeAsset};
 use xcm_executor::{
modifiedruntime/common/mod.rsdiffbeforeafterboth
--- a/runtime/common/mod.rs
+++ b/runtime/common/mod.rs
@@ -39,10 +39,7 @@
 #[cfg(feature = "std")]
 use sp_version::NativeVersion;
 
-use crate::{
-	Runtime, Call, Balances, Treasury, Aura, Signature, AllPalletsWithSystem,
-	InherentDataExt,
-};
+use crate::{Runtime, Call, Balances, Treasury, Aura, Signature, AllPalletsWithSystem, InherentDataExt};
 use up_common::types::{AccountId, BlockNumber};
 
 #[macro_export]
@@ -105,7 +102,7 @@
 	Block,
 	frame_system::ChainContext<Runtime>,
 	Runtime,
-	AllPalletsWithSystem
+	AllPalletsWithSystem,
 >;
 
 type NegativeImbalance = <Balances as Currency<AccountId>>::NegativeImbalance;
modifiedruntime/opal/src/xcm_barrier.rsdiffbeforeafterboth
--- a/runtime/opal/src/xcm_barrier.rs
+++ b/runtime/opal/src/xcm_barrier.rs
@@ -15,7 +15,10 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use frame_support::traits::Everything;
-use xcm::{latest::{Xcm, Weight}, v1::MultiLocation};
+use xcm::{
+	latest::{Xcm, Weight},
+	v1::MultiLocation,
+};
 use xcm_builder::{AllowTopLevelPaidExecutionFrom, TakeWeightCredit};
 use xcm_executor::traits::ShouldExecute;