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
@@ -18,12 +18,14 @@
use parity_scale_codec::{Decode, Encode};
use polkadot_primitives::v1::{CandidateHash, CandidateReceipt, CommittedCandidateReceipt, Hash, ValidatorIndex};
use polkadot_primitives::v1::Id as ParaId;
use polkadot_node_primitives::{AvailableData, DisputeMessage, ErasureChunk, PoV, UncheckedDisputeMessage};
use polkadot_node_primitives::{
AvailableData, DisputeMessage, ErasureChunk, PoV, UncheckedDisputeMessage,
};
use polkadot_primitives::v1::{
CandidateHash, CandidateReceipt, CommittedCandidateReceipt, Hash, Id as ParaId, ValidatorIndex,
};
use super::request::IsRequest;
use super::Protocol;
use super::{request::IsRequest, Protocol};
/// Request an availability chunk.
#[derive(Debug, Copy, Clone, Encode, Decode)]
@@ -69,19 +71,15 @@ pub struct ChunkResponse {
}
impl From<ErasureChunk> for ChunkResponse {
fn from(ErasureChunk {chunk, index: _, proof}: ErasureChunk) -> Self {
ChunkResponse {chunk, proof}
fn from(ErasureChunk { chunk, index: _, proof }: ErasureChunk) -> Self {
ChunkResponse { chunk, proof }
}
}
impl ChunkResponse {
/// Re-build an `ErasureChunk` from response and request.
pub fn recombine_into_chunk(self, req: &ChunkFetchingRequest) -> ErasureChunk {
ErasureChunk {
chunk: self.chunk,
proof: self.proof,
index: req.index,
}
ErasureChunk { chunk: self.chunk, proof: self.proof, index: req.index }
}
}
@@ -210,7 +208,7 @@ impl From<DisputeMessage> for DisputeRequest {
pub enum DisputeResponse {
/// Recipient successfully processed the dispute request.
#[codec(index = 0)]
Confirmed
Confirmed,
}
impl IsRequest for DisputeRequest {