Use same fmt and clippy configs as in Polkadot (#3004)

* Copy rustfmt.toml from Polkadot master

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Format with new config

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add Polkadot clippy config

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update Cargo.lock

Looks like https://github.com/paritytech/polkadot/pull/7611 did not
correctly update the lockfile. Maybe a different Rust Version?!

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2023-08-14 22:30:12 +02:00
committed by GitHub
parent 61480a1881
commit 6c79b58567
60 changed files with 333 additions and 233 deletions
+6 -3
View File
@@ -38,7 +38,8 @@ pub mod pallet {
#[pallet::without_storage_info]
pub struct Pallet<T>(_);
/// In case of a scheduled migration, this storage field contains the custom head data to be applied.
/// In case of a scheduled migration, this storage field contains the custom head data to be
/// applied.
#[pallet::storage]
pub(super) type PendingCustomValidationHeadData<T: Config> =
StorageValue<_, Vec<u8>, OptionQuery>;
@@ -48,7 +49,8 @@ pub mod pallet {
pub enum Event {
/// The custom validation head data has been scheduled to apply.
CustomValidationHeadDataStored,
/// The custom validation head data was applied as of the contained relay chain block number.
/// The custom validation head data was applied as of the contained relay chain block
/// number.
CustomValidationHeadDataApplied,
}
@@ -83,7 +85,8 @@ pub mod pallet {
Self::deposit_event(Event::CustomValidationHeadDataStored);
}
/// Set pending custom head data as head data that will be returned by `validate_block`. on the relay chain.
/// Set pending custom head data as head data that will be returned by `validate_block`. on
/// the relay chain.
fn set_pending_custom_validation_head_data() {
if let Some(head_data) = <PendingCustomValidationHeadData<T>>::take() {
parachain_system::Pallet::<T>::set_custom_validation_head_data(head_data);