Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 938706a

Browse files
committed
Remove double spaces.
1 parent d0f096d commit 938706a

File tree

13 files changed

+21
-21
lines changed

13 files changed

+21
-21
lines changed

demo/cli/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl extrinsic_pool::ChainApi for Pool {
9595
unimplemented!()
9696
}
9797

98-
fn ready(&self) -> Self::Ready { }
98+
fn ready(&self) -> Self::Ready { }
9999

100100
fn is_ready(&self, _at: &BlockId, _ready: &mut Self::Ready, _xt: &VerifiedFor<Self>) -> Readiness {
101101
unimplemented!()

subkey/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ mod tests {
137137
#[test]
138138
fn test_score_1_char_100() {
139139
let score = calculate_score("j", "5jolkadotwHY5k9GpdTgpqs9xjuNvtv8EcwCFpEeyEf3KHim");
140-
assert!(score == 100, format!("Wrong score, we found {}", score));
140+
assert!(score == 100, format!("Wrong score, we found {}", score));
141141
}
142142

143143
#[test]

substrate/client/db/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ impl<Block> client::backend::Backend<Block, KeccakHasher, RlpCodec> for Backend<
455455
}
456456

457457
self.blockchain.header(block).and_then(|maybe_hdr| maybe_hdr.map(|hdr| {
458-
let root: H256 = H256::from_slice(hdr.state_root().as_ref());
458+
let root: H256 = H256::from_slice(hdr.state_root().as_ref());
459459
DbState::with_storage(self.storage.clone(), root)
460460
}).ok_or_else(|| client::error::ErrorKind::UnknownBlock(format!("{:?}", block)).into()))
461461
}

substrate/extrinsic-pool/src/pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ impl<B: ChainApi> Pool<B> {
248248
}
249249

250250
/// Imports one unverified extrinsic to the pool
251-
pub fn submit_one(&self, at: &BlockId<B::Block>, xt: ExtrinsicFor<B>) -> Result<Arc<VerifiedFor<B>>, B::Error> {
251+
pub fn submit_one(&self, at: &BlockId<B::Block>, xt: ExtrinsicFor<B>) -> Result<Arc<VerifiedFor<B>>, B::Error> {
252252
Ok(self.submit_at(at, ::std::iter::once(xt))?.pop().expect("One extrinsic passed; one result returned; qed"))
253253
}
254254

substrate/network-libp2p/src/network_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ impl NetworkState {
677677
}
678678

679679
/// Disables a peer for `PEER_DISABLE_DURATION`. This adds the peer to the
680-
/// list of disabled peers, and drops any existing connections if
680+
/// list of disabled peers, and drops any existing connections if
681681
/// necessary (ie. drops the sender that was stored in the `UniqueConnec`
682682
/// of `custom_proto`).
683683
pub fn ban_peer(&self, who: NodeIndex, reason: &str) {

substrate/network-libp2p/src/service.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ fn handle_custom_connection(
864864
/// nodes and only accept incoming connections.
865865
fn start_kademlia_discovery<T, To, St, C>(shared: Arc<Shared>, transport: T,
866866
swarm_controller: SwarmController<St>) -> impl Future<Item = (), Error = IoError>
867-
where T: MuxedTransport<Output = TransportOutput<To>> + Clone + 'static,
867+
where T: MuxedTransport<Output = TransportOutput<To>> + Clone + 'static,
868868
T::MultiaddrFuture: 'static,
869869
To: AsyncRead + AsyncWrite + 'static,
870870
St: MuxedTransport<Output = FinalUpgrade<C>> + Clone + 'static,
@@ -931,7 +931,7 @@ fn perform_kademlia_query<T, To, St, C>(
931931
transport: T,
932932
swarm_controller: SwarmController<St>
933933
) -> impl Future<Item = (), Error = IoError>
934-
where T: MuxedTransport<Output = TransportOutput<To>> + Clone + 'static,
934+
where T: MuxedTransport<Output = TransportOutput<To>> + Clone + 'static,
935935
T::MultiaddrFuture: 'static,
936936
To: AsyncRead + AsyncWrite + 'static,
937937
St: MuxedTransport<Output = FinalUpgrade<C>> + Clone + 'static,
@@ -980,7 +980,7 @@ fn connect_to_nodes<T, To, St, C>(
980980
base_transport: T,
981981
swarm_controller: &SwarmController<St>
982982
)
983-
where T: MuxedTransport<Output = TransportOutput<To>> + Clone + 'static,
983+
where T: MuxedTransport<Output = TransportOutput<To>> + Clone + 'static,
984984
T::MultiaddrFuture: 'static,
985985
To: AsyncRead + AsyncWrite + 'static,
986986
St: MuxedTransport<Output = FinalUpgrade<C>> + Clone + 'static,
@@ -1025,7 +1025,7 @@ fn connect_with_query_peer_id<T, To, St, C>(
10251025
addr: Multiaddr,
10261026
swarm_controller: &SwarmController<St>
10271027
)
1028-
where T: MuxedTransport<Output = TransportOutput<To>> + Clone + 'static,
1028+
where T: MuxedTransport<Output = TransportOutput<To>> + Clone + 'static,
10291029
T::MultiaddrFuture: 'static,
10301030
To: AsyncRead + AsyncWrite + 'static,
10311031
St: MuxedTransport<Output = FinalUpgrade<C>> + Clone + 'static,
@@ -1087,7 +1087,7 @@ fn open_peer_custom_proto<T, To, St, C>(
10871087
expected_peer_id: PeerstorePeerId,
10881088
swarm_controller: &SwarmController<St>
10891089
)
1090-
where T: MuxedTransport<Output = TransportOutput<To>> + Clone + 'static,
1090+
where T: MuxedTransport<Output = TransportOutput<To>> + Clone + 'static,
10911091
T::MultiaddrFuture: 'static,
10921092
To: AsyncRead + AsyncWrite + 'static,
10931093
St: MuxedTransport<Output = FinalUpgrade<C>> + Clone + 'static,
@@ -1177,7 +1177,7 @@ fn open_peer_custom_proto<T, To, St, C>(
11771177
fn obtain_kad_connection<T, To, St, C>(shared: Arc<Shared>,
11781178
who: PeerstorePeerId, transport: T, swarm_controller: SwarmController<St>)
11791179
-> impl Future<Item = KadConnecController, Error = IoError>
1180-
where T: MuxedTransport<Output = TransportOutput<To>> + Clone + 'static,
1180+
where T: MuxedTransport<Output = TransportOutput<To>> + Clone + 'static,
11811181
T::MultiaddrFuture: 'static,
11821182
To: AsyncRead + AsyncWrite + 'static,
11831183
St: MuxedTransport<Output = FinalUpgrade<C>> + Clone + 'static,

substrate/network/src/blocks.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl<B: BlockT> BlockCollection<B> {
106106
loop {
107107
let next = downloading_iter.next();
108108
break match &(prev, next) {
109-
&(Some((start, &BlockRangeState::Downloading { ref len, downloading })), _) if downloading < MAX_PARALLEL_DOWNLOADS =>
109+
&(Some((start, &BlockRangeState::Downloading { ref len, downloading })), _) if downloading < MAX_PARALLEL_DOWNLOADS =>
110110
(*start .. *start + *len, downloading),
111111
&(Some((start, r)), Some((next_start, _))) if *start + r.len() < *next_start =>
112112
(*start + r.len() .. cmp::min(*next_start, *start + r.len() + count), 0), // gap
@@ -171,7 +171,7 @@ impl<B: BlockT> BlockCollection<B> {
171171
*downloading = *downloading - 1;
172172
false
173173
},
174-
Some(&mut BlockRangeState::Downloading { .. }) => {
174+
Some(&mut BlockRangeState::Downloading { .. }) => {
175175
true
176176
},
177177
_ => {
@@ -217,7 +217,7 @@ mod test {
217217
fn create_clear() {
218218
let mut bc = BlockCollection::new();
219219
assert!(is_empty(&bc));
220-
bc.insert(1, generate_blocks(100), 0);
220+
bc.insert(1, generate_blocks(100), 0);
221221
assert!(!is_empty(&bc));
222222
bc.clear();
223223
assert!(is_empty(&bc));

substrate/network/src/protocol.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ impl<B: BlockT, S: Specialization<B>, H: ExHashT> Protocol<B, S, H> {
191191
on_demand: Option<Arc<OnDemandService<B>>>,
192192
transaction_pool: Arc<TransactionPool<H, B>>,
193193
specialization: S,
194-
) -> error::Result<Self> {
194+
) -> error::Result<Self> {
195195
let info = chain.info()?;
196196
let sync = ChainSync::new(config.roles, &info, import_queue);
197197
let protocol = Protocol {

substrate/primitives/src/bytes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub fn deserialize_check_len<'de, D>(deserializer: D, len: ExpectedLen) -> Resul
108108
}
109109

110110
fn visit_str<E: de::Error>(self, v: &str) -> Result<Self::Value, E> {
111-
if v.len() < 2 || &v[0..2] != "0x" {
111+
if v.len() < 2 || &v[0..2] != "0x" {
112112
return Err(E::custom("prefix is missing"))
113113
}
114114

substrate/rpc/src/author/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl ChainApi for TestApi {
5656
fn verify_transaction(&self, _at: &BlockId<Block>, uxt: &ExtrinsicFor<Self>) -> Result<Self::VEx, Self::Error> {
5757
Ok(Verified {
5858
sender: uxt.transfer.from[31] as u64,
59-
hash: uxt.transfer.nonce,
59+
hash: uxt.transfer.nonce,
6060
})
6161
}
6262

0 commit comments

Comments
 (0)