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

Commit

Permalink
Fix style again
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaka committed Jul 13, 2018
1 parent e9757a4 commit 6731f05
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions substrate/network-libp2p/src/custom_proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,13 @@ where C: AsyncRead + AsyncWrite + 'static, // TODO: 'static :-/
type MultiaddrFuture = Maf;
type Future = future::FutureResult<(Self::Output, Self::MultiaddrFuture), IoError>;

fn upgrade(self, socket: C, protocol_version: Self::UpgradeIdentifier,
_: Endpoint, remote_addr: Maf) -> Self::Future {
fn upgrade(
self,
socket: C,
protocol_version: Self::UpgradeIdentifier,
endpoint: Endpoint,
remote_addr: Maf
) -> Self::Future {
let packet_count = self.supported_versions
.iter()
.find(|&(v, _)| *v == protocol_version)
Expand Down Expand Up @@ -265,8 +270,13 @@ where C: AsyncRead + AsyncWrite + 'static, // TODO: 'static :-/
type Future = <RegisteredProtocol<T> as ConnectionUpgrade<C, Maf>>::Future;

#[inline]
fn upgrade(self, socket: C, upgrade_identifier: Self::UpgradeIdentifier,
endpoint: Endpoint, remote_addr: Maf) -> Self::Future {
fn upgrade(
self,
socket: C,
upgrade_identifier: Self::UpgradeIdentifier,
endpoint: Endpoint,
remote_addr: Maf
) -> Self::Future {
let (protocol_index, inner_proto_id) = upgrade_identifier;
self.0.into_iter()
.nth(protocol_index)
Expand Down

0 comments on commit 6731f05

Please sign in to comment.