Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekvpandya committed Mar 8, 2023
1 parent 357989c commit 9499dcc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions pallets/parachain-system/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.

use crate::{Config, Pallet, ReservedDmpWeightOverride, ReservedXcmpWeightOverride };
use crate::{Config, Pallet, ReservedDmpWeightOverride, ReservedXcmpWeightOverride};
use frame_support::{
traits::{Get, StorageVersion},
weights::Weight,
Expand Down Expand Up @@ -52,18 +52,14 @@ mod v2 {
pub fn migrate<T: Config>() -> Weight {
let translate = |pre: u64| -> Weight { Weight::from_parts(pre, DEFAULT_POV_SIZE) };

if ReservedXcmpWeightOverride::<T>::translate(|pre| pre.map(translate))
.is_err()
{
if ReservedXcmpWeightOverride::<T>::translate(|pre| pre.map(translate)).is_err() {
log::error!(
target: "parachain_system",
"unexpected error when performing translation of the ReservedXcmpWeightOverride type during storage upgrade to v2"
);
}

if ReservedDmpWeightOverride::<T>::translate(|pre| pre.map(translate))
.is_err()
{
if ReservedDmpWeightOverride::<T>::translate(|pre| pre.map(translate)).is_err() {
log::error!(
target: "parachain_system",
"unexpected error when performing translation of the ReservedDmpWeightOverride type during storage upgrade to v2"
Expand Down
2 changes: 1 addition & 1 deletion pallets/xcmp-queue/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

//! A module that is responsible for migration of storage.
use crate::{Config, Pallet, Overweight, QueueConfig, DEFAULT_POV_SIZE};
use crate::{Config, Overweight, Pallet, QueueConfig, DEFAULT_POV_SIZE};
use frame_support::{
pallet_prelude::*,
traits::StorageVersion,
Expand Down

0 comments on commit 9499dcc

Please sign in to comment.