ci: add quick-check with rustfmt (#615)

* ci: add quick-check with clippy and rustfmt

* chore: rustfmt round

* chore: set the same rustfmt config than substrate

* chore: fix formatting

* cI: remove clippy

* ci: switch to nightly for the checks

* ci: fix toolchains and naming

* ci: Limit the check to formatting

* chore: fix formatting

* Update .rustfmt.toml

* Update .rustfmt.toml

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Chevdor
2021-09-16 16:57:52 +02:00
committed by GitHub
parent e3eb3a0a12
commit 6b20f7a2c5
98 changed files with 1244 additions and 1872 deletions
@@ -22,9 +22,9 @@ pub use pallet::*;
#[frame_support::pallet]
pub mod pallet {
use cumulus_primitives_core::ParaId;
use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
use cumulus_primitives_core::ParaId;
#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
@@ -47,9 +47,7 @@ pub mod pallet {
#[cfg(feature = "std")]
impl Default for GenesisConfig {
fn default() -> Self {
Self {
parachain_id: 100.into()
}
Self { parachain_id: 100.into() }
}
}
@@ -61,11 +59,14 @@ pub mod pallet {
}
#[pallet::type_value]
pub(super) fn DefaultForParachainId() -> ParaId { 100.into() }
pub(super) fn DefaultForParachainId() -> ParaId {
100.into()
}
#[pallet::storage]
#[pallet::getter(fn parachain_id)]
pub(super) type ParachainId<T: Config> = StorageValue<_, ParaId, ValueQuery, DefaultForParachainId>;
pub(super) type ParachainId<T: Config> =
StorageValue<_, ParaId, ValueQuery, DefaultForParachainId>;
impl<T: Config> Get<ParaId> for Pallet<T> {
fn get() -> ParaId {