Run cargo fmt on the whole code base (#9394)

* Run cargo fmt on the whole code base

* Second run

* Add CI check

* Fix compilation

* More unnecessary braces

* Handle weights

* Use --all

* Use correct attributes...

* Fix UI tests

* AHHHHHHHHH

* 🤦

* Docs

* Fix compilation

* 🤷

* Please stop

* 🤦 x 2

* More

* make rustfmt.toml consistent with polkadot

Co-authored-by: André Silva <andrerfosilva@gmail.com>
This commit is contained in:
Bastian Köcher
2021-07-21 16:32:32 +02:00
committed by GitHub
parent d451c38c1c
commit 7b56ab15b4
1010 changed files with 53339 additions and 51208 deletions
+12 -14
View File
@@ -21,11 +21,11 @@
pub mod error;
pub mod hash;
use self::error::{FutureResult, Result};
use jsonrpc_derive::rpc;
use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId};
use sp_core::Bytes;
use sc_transaction_pool_api::TransactionStatus;
use self::error::{FutureResult, Result};
use sp_core::Bytes;
pub use self::gen_client::Client as AuthorClient;
@@ -41,12 +41,7 @@ pub trait AuthorApi<Hash, BlockHash> {
/// Insert a key into the keystore.
#[rpc(name = "author_insertKey")]
fn insert_key(
&self,
key_type: String,
suri: String,
public: Bytes,
) -> Result<()>;
fn insert_key(&self, key_type: String, suri: String, public: Bytes) -> Result<()>;
/// Generate new session keys and returns the corresponding public keys.
#[rpc(name = "author_rotateKeys")]
@@ -72,8 +67,9 @@ pub trait AuthorApi<Hash, BlockHash> {
/// Remove given extrinsic from the pool and temporarily ban it to prevent reimporting.
#[rpc(name = "author_removeExtrinsic")]
fn remove_extrinsic(&self,
bytes_or_hash: Vec<hash::ExtrinsicOrHash<Hash>>
fn remove_extrinsic(
&self,
bytes_or_hash: Vec<hash::ExtrinsicOrHash<Hash>>,
) -> Result<Vec<Hash>>;
/// Submit an extrinsic to watch.
@@ -85,10 +81,11 @@ pub trait AuthorApi<Hash, BlockHash> {
subscribe,
name = "author_submitAndWatchExtrinsic"
)]
fn watch_extrinsic(&self,
fn watch_extrinsic(
&self,
metadata: Self::Metadata,
subscriber: Subscriber<TransactionStatus<Hash, BlockHash>>,
bytes: Bytes
bytes: Bytes,
);
/// Unsubscribe from extrinsic watching.
@@ -97,8 +94,9 @@ pub trait AuthorApi<Hash, BlockHash> {
unsubscribe,
name = "author_unwatchExtrinsic"
)]
fn unwatch_extrinsic(&self,
fn unwatch_extrinsic(
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
id: SubscriptionId,
) -> Result<bool>;
}