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
@@ -26,18 +26,23 @@
//!
//! See [`Worker`] and [`Service`] for more documentation.
pub use crate::{service::Service, worker::{NetworkProvider, Worker, Role}};
pub use crate::{
service::Service,
worker::{NetworkProvider, Role, Worker},
};
use std::{sync::Arc, time::Duration};
use futures::channel::{mpsc, oneshot};
use futures::Stream;
use futures::{
channel::{mpsc, oneshot},
Stream,
};
use sc_client_api::blockchain::HeaderBackend;
use sc_network::{DhtEvent, Multiaddr, PeerId};
use sp_api::ProvideRuntimeApi;
use sp_authority_discovery::{AuthorityDiscoveryApi, AuthorityId};
use sp_runtime::traits::Block as BlockT;
use sp_api::ProvideRuntimeApi;
mod error;
mod interval;
@@ -141,15 +146,8 @@ where
{
let (to_worker, from_service) = mpsc::channel(0);
let worker = Worker::new(
from_service,
client,
network,
dht_event_rx,
role,
prometheus_registry,
config,
);
let worker =
Worker::new(from_service, client, network, dht_event_rx, role, prometheus_registry, config);
let service = Service::new(to_worker);
(worker, service)
@@ -160,5 +158,5 @@ pub(crate) enum ServicetoWorkerMsg {
/// See [`Service::get_addresses_by_authority_id`].
GetAddressesByAuthorityId(AuthorityId, oneshot::Sender<Option<Vec<Multiaddr>>>),
/// See [`Service::get_authority_id_by_peer_id`].
GetAuthorityIdByPeerId(PeerId, oneshot::Sender<Option<AuthorityId>>)
GetAuthorityIdByPeerId(PeerId, oneshot::Sender<Option<AuthorityId>>),
}