cargo +nightly fmt (#3540)

* cargo +nightly fmt

* add cargo-fmt check to ci

* update ci

* fmt

* fmt

* skip macro

* ignore bridges
This commit is contained in:
Shawn Tabrizi
2021-08-02 12:47:33 +02:00
committed by GitHub
parent 30e3012270
commit ff5d56fb76
350 changed files with 20617 additions and 21266 deletions
+16 -9
View File
@@ -26,17 +26,22 @@ use sp_core::storage::Storage;
use sp_runtime::BuildStorage;
pub use block_builder::*;
pub use substrate_test_client::*;
pub use polkadot_test_service::{
Client, construct_extrinsic, construct_transfer_extrinsic, PolkadotTestExecutor, FullBackend,
};
pub use polkadot_test_runtime as runtime;
pub use polkadot_test_service::{
construct_extrinsic, construct_transfer_extrinsic, Client, FullBackend, PolkadotTestExecutor,
};
pub use substrate_test_client::*;
/// Test client executor.
pub type Executor = client::LocalCallExecutor<Block, FullBackend, sc_executor::NativeExecutor<PolkadotTestExecutor>>;
pub type Executor = client::LocalCallExecutor<
Block,
FullBackend,
sc_executor::NativeExecutor<PolkadotTestExecutor>,
>;
/// Test client builder for Polkadot.
pub type TestClientBuilder = substrate_test_client::TestClientBuilder<Block, Executor, FullBackend, GenesisParameters>;
pub type TestClientBuilder =
substrate_test_client::TestClientBuilder<Block, Executor, FullBackend, GenesisParameters>;
/// `LongestChain` type for the test runtime/client.
pub type LongestChain = sc_consensus::LongestChain<FullBackend, Block>;
@@ -83,7 +88,7 @@ impl DefaultTestClientBuilderExt for TestClientBuilder {
}
#[cfg(test)]
mod tests{
mod tests {
use super::*;
use sp_consensus::BlockOrigin;
@@ -94,7 +99,8 @@ mod tests{
let block_builder = client.init_polkadot_block_builder();
let block = block_builder.build().expect("Finalizes the block").block;
futures::executor::block_on(client.import(BlockOrigin::Own, block)).expect("Imports the block");
futures::executor::block_on(client.import(BlockOrigin::Own, block))
.expect("Imports the block");
}
#[test]
@@ -112,6 +118,7 @@ mod tests{
let block = block_builder.build().expect("Finalizes the block").block;
futures::executor::block_on(client.import(BlockOrigin::Own, block)).expect("Imports the block");
futures::executor::block_on(client.import(BlockOrigin::Own, block))
.expect("Imports the block");
}
}