Skip to content

Commit

Permalink
Fix formatting with cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
geieredgar authored and djc committed Feb 12, 2021
1 parent 2687ef8 commit a016715
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 18 deletions.
5 changes: 4 additions & 1 deletion quinn-proto/src/connection/streams/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ impl Send {

/// Whether the stream has been reset
pub(super) fn is_reset(&self) -> bool {
matches!(self.state, SendState::ResetSent { .. } | SendState::ResetRecvd { .. })
matches!(
self.state,
SendState::ResetSent { .. } | SendState::ResetRecvd { .. }
)
}

pub(super) fn finish(&mut self) -> Result<(), FinishError> {
Expand Down
13 changes: 11 additions & 2 deletions quinn-proto/src/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,10 @@ impl Header {

/// Whether the packet is encrypted on the wire
pub(crate) fn is_protected(&self) -> bool {
!matches!(*self, Header::Retry { .. } | Header::VersionNegotiate { .. })
!matches!(
*self,
Header::Retry { .. } | Header::VersionNegotiate { .. }
)
}

pub(crate) fn number(&self) -> Option<PacketNumber> {
Expand Down Expand Up @@ -387,7 +390,13 @@ impl Header {
}

pub(crate) fn is_0rtt(&self) -> bool {
matches!(*self, Header::Long { ty: LongType::ZeroRtt, .. })
matches!(
*self,
Header::Long {
ty: LongType::ZeroRtt,
..
}
)
}

pub(crate) fn dst_cid(&self) -> &ConnectionId {
Expand Down
27 changes: 12 additions & 15 deletions quinn-proto/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -815,11 +815,10 @@ fn instant_close_1() {
assert_matches!(
pair.server_conn_mut(server_ch).poll(),
Some(Event::ConnectionLost {
reason:
ConnectionError::ConnectionClosed(ConnectionClose {
error_code: TransportErrorCode::APPLICATION_ERROR,
..
}),
reason: ConnectionError::ConnectionClosed(ConnectionClose {
error_code: TransportErrorCode::APPLICATION_ERROR,
..
}),
})
);
}
Expand Down Expand Up @@ -847,11 +846,10 @@ fn instant_close_2() {
assert_matches!(
pair.server_conn_mut(server_ch).poll(),
Some(Event::ConnectionLost {
reason:
ConnectionError::ConnectionClosed(ConnectionClose {
error_code: TransportErrorCode::APPLICATION_ERROR,
..
}),
reason: ConnectionError::ConnectionClosed(ConnectionClose {
error_code: TransportErrorCode::APPLICATION_ERROR,
..
}),
})
);
}
Expand Down Expand Up @@ -913,11 +911,10 @@ fn concurrent_connections_full() {
assert_matches!(
pair.client_conn_mut(client_ch).poll(),
Some(Event::ConnectionLost {
reason:
ConnectionError::ConnectionClosed(frame::ConnectionClose {
error_code: TransportErrorCode::CONNECTION_REFUSED,
..
}),
reason: ConnectionError::ConnectionClosed(frame::ConnectionClose {
error_code: TransportErrorCode::CONNECTION_REFUSED,
..
}),
})
);
assert_eq!(pair.server.connections.len(), 0);
Expand Down

0 comments on commit a016715

Please sign in to comment.