Skip to content

Commit

Permalink
run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessio Treglia committed Sep 26, 2023
1 parent 6455c98 commit 4a3e70d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 55 deletions.
6 changes: 2 additions & 4 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ use jur_node_runtime::{
AccountId, AuraConfig, BalancesConfig, Block, GrandpaConfig, RuntimeGenesisConfig, Signature,
SudoConfig, SystemConfig, WASM_BINARY,
};
use sc_chain_spec::ChainSpecExtension;
use sc_service::ChainType;
use sc_service::Properties;
use serde::{Deserialize, Serialize};
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_consensus_grandpa::AuthorityId as GrandpaId;
use sp_core::crypto::UncheckedInto;
use sp_core::{sr25519, Pair, Public};
use sp_runtime::traits::{IdentifyAccount, Verify};
use sp_runtime::AccountId32;
use std::str::FromStr;
use sc_chain_spec::ChainSpecExtension;
use serde::{Deserialize, Serialize};


/// Node `ChainSpec` extensions.
///
Expand All @@ -31,7 +30,6 @@ pub struct Extensions {
pub light_sync_state: sc_sync_state_rpc::LightSyncStateExtension,
}


/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.
pub type ChainSpec = sc_service::GenericChainSpec<RuntimeGenesisConfig, Extensions>;

Expand Down
96 changes: 45 additions & 51 deletions pallets/community/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,13 @@ pub mod v8 {
old_value
.into_iter()
.map(|c| {
let new_value =
c.try_into().unwrap_or_else(|_| {
log::error!(
target: LOG_TARGET,
"Failed to convert language"
);
Default::default()
});
let new_value = c.try_into().unwrap_or_else(|_| {
log::error!(
target: LOG_TARGET,
"Failed to convert language"
);
Default::default()
});
Languages(new_value)
})
.collect::<Vec<Languages<T::StringLimit>>>(),
Expand All @@ -114,14 +113,13 @@ pub mod v8 {
old_value
.into_iter()
.map(|c| {
let new_value =
c.try_into().unwrap_or_else(|_| {
log::error!(
target: LOG_TARGET,
"Failed to convert norms"
);
Default::default()
});
let new_value = c.try_into().unwrap_or_else(|_| {
log::error!(
target: LOG_TARGET,
"Failed to convert norms"
);
Default::default()
});
Norms(new_value)
})
.collect::<Vec<Norms<T::StringLimit>>>(),
Expand All @@ -133,14 +131,13 @@ pub mod v8 {
old_value
.into_iter()
.map(|c| {
let new_value =
c.try_into().unwrap_or_else(|_| {
log::error!(
target: LOG_TARGET,
"Failed to convert religions"
);
Default::default()
});
let new_value = c.try_into().unwrap_or_else(|_| {
log::error!(
target: LOG_TARGET,
"Failed to convert religions"
);
Default::default()
});
Religions(new_value)
})
.collect::<Vec<Religions<T::StringLimit>>>(),
Expand All @@ -152,14 +149,13 @@ pub mod v8 {
old_value
.into_iter()
.map(|c| {
let new_value =
c.try_into().unwrap_or_else(|_| {
log::error!(
target: LOG_TARGET,
"Failed to convert territories"
);
Default::default()
});
let new_value = c.try_into().unwrap_or_else(|_| {
log::error!(
target: LOG_TARGET,
"Failed to convert territories"
);
Default::default()
});
Territories(new_value)
})
.collect::<Vec<Territories<T::StringLimit>>>(),
Expand All @@ -171,14 +167,13 @@ pub mod v8 {
old_value
.into_iter()
.map(|c| {
let new_value =
c.try_into().unwrap_or_else(|_| {
log::error!(
target: LOG_TARGET,
"Failed to convert traditions"
);
Default::default()
});
let new_value = c.try_into().unwrap_or_else(|_| {
log::error!(
target: LOG_TARGET,
"Failed to convert traditions"
);
Default::default()
});
Traditions(new_value)
})
.collect::<Vec<Traditions<T::StringLimit>>>(),
Expand All @@ -190,14 +185,13 @@ pub mod v8 {
old_value
.into_iter()
.map(|c| {
let new_value =
c.try_into().unwrap_or_else(|_| {
log::error!(
target: LOG_TARGET,
"Failed to convert values"
);
Default::default()
});
let new_value = c.try_into().unwrap_or_else(|_| {
log::error!(
target: LOG_TARGET,
"Failed to convert values"
);
Default::default()
});
Values(new_value)
})
.collect::<Vec<Values<T::StringLimit>>>(),
Expand All @@ -219,9 +213,9 @@ pub mod v8 {
if let Some(logo) = old_value.logo {
logo.try_into().unwrap_or_else(|_| {
log::error!(
target: LOG_TARGET,
"Failed to convert logo"
);
target: LOG_TARGET,
"Failed to convert logo"
);
Default::default()
})
} else {
Expand Down

0 comments on commit 4a3e70d

Please sign in to comment.