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
@@ -16,15 +16,24 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
use crate::{new_worker_and_service, worker::{tests::{TestApi, TestNetwork}, Role}};
use crate::{
new_worker_and_service,
worker::{
tests::{TestApi, TestNetwork},
Role,
},
};
use std::sync::Arc;
use futures::{channel::mpsc::channel, executor::LocalPool, task::LocalSpawn};
use libp2p::core::{multiaddr::{Multiaddr, Protocol}, PeerId};
use libp2p::core::{
multiaddr::{Multiaddr, Protocol},
PeerId,
};
use std::sync::Arc;
use sp_authority_discovery::AuthorityId;
use sp_core::crypto::key_types;
use sp_keystore::{CryptoStore, testing::KeyStore};
use sp_keystore::{testing::KeyStore, CryptoStore};
#[test]
fn get_addresses_and_authority_id() {
@@ -44,13 +53,12 @@ fn get_addresses_and_authority_id() {
});
let remote_peer_id = PeerId::random();
let remote_addr = "/ip6/2001:db8:0:0:0:0:0:2/tcp/30333".parse::<Multiaddr>()
let remote_addr = "/ip6/2001:db8:0:0:0:0:0:2/tcp/30333"
.parse::<Multiaddr>()
.unwrap()
.with(Protocol::P2p(remote_peer_id.clone().into()));
let test_api = Arc::new(TestApi {
authorities: vec![],
});
let test_api = Arc::new(TestApi { authorities: vec![] });
let (mut worker, mut service) = new_worker_and_service(
test_api,