Automatic fixes by cargo-fix (#1662)

This commit is contained in:
Demi Obenour
2020-07-27 20:27:33 +00:00
committed by GitHub
parent 8a08f72e84
commit 9178459cc8
90 changed files with 309 additions and 309 deletions

View File

@ -81,7 +81,7 @@ impl ProtocolsHandler for DummyProtocolsHandler {
#[inline]
fn poll(
&mut self,
_: &mut Context,
_: &mut Context<'_>,
) -> Poll<
ProtocolsHandlerEvent<Self::OutboundProtocol, Self::OutboundOpenInfo, Self::OutEvent, Self::Error>,
> {

View File

@ -104,7 +104,7 @@ where
#[inline]
fn poll(
&mut self,
cx: &mut Context,
cx: &mut Context<'_>,
) -> Poll<
ProtocolsHandlerEvent<Self::OutboundProtocol, Self::OutboundOpenInfo, Self::OutEvent, Self::Error>,
> {

View File

@ -100,7 +100,7 @@ where
#[inline]
fn poll(
&mut self,
cx: &mut Context,
cx: &mut Context<'_>,
) -> Poll<
ProtocolsHandlerEvent<Self::OutboundProtocol, Self::OutboundOpenInfo, Self::OutEvent, Self::Error>,
> {

View File

@ -58,7 +58,7 @@ where
K: fmt::Debug + Eq + Hash,
H: fmt::Debug
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("MultiHandler")
.field("handlers", &self.handlers)
.finish()
@ -154,7 +154,7 @@ where
.unwrap_or(KeepAlive::No)
}
fn poll(&mut self, cx: &mut Context)
fn poll(&mut self, cx: &mut Context<'_>)
-> Poll<ProtocolsHandlerEvent<Self::OutboundProtocol, Self::OutboundOpenInfo, Self::OutEvent, Self::Error>>
{
// Calling `gen_range(0, 0)` (see below) would panic, so we have return early to avoid
@ -195,7 +195,7 @@ where
K: fmt::Debug + Eq + Hash,
H: fmt::Debug
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("IntoMultiHandler")
.field("handlers", &self.handlers)
.finish()
@ -266,7 +266,7 @@ where
K: fmt::Debug + Eq + Hash,
H: fmt::Debug
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Upgrade")
.field("upgrades", &self.upgrades)
.finish()
@ -369,7 +369,7 @@ impl DuplicateProtonameError {
}
impl fmt::Display for DuplicateProtonameError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
if let Ok(s) = std::str::from_utf8(&self.0) {
write!(f, "duplicate protocol name: {}", s)
} else {

View File

@ -225,7 +225,7 @@ where
self.handler.inject_address_change(new_address);
}
fn poll(&mut self, cx: &mut Context) -> Poll<
fn poll(&mut self, cx: &mut Context<'_>) -> Poll<
Result<ConnectionHandlerEvent<Self::OutboundOpenInfo, Self::OutEvent>, Self::Error>
> {
// Continue negotiation of newly-opened substreams on the listening side.

View File

@ -191,7 +191,7 @@ where
fn poll(
&mut self,
_: &mut Context,
_: &mut Context<'_>,
) -> Poll<
ProtocolsHandlerEvent<Self::OutboundProtocol, Self::OutboundOpenInfo, Self::OutEvent, Self::Error>,
> {

View File

@ -187,7 +187,7 @@ where
cmp::max(self.proto1.connection_keep_alive(), self.proto2.connection_keep_alive())
}
fn poll(&mut self, cx: &mut Context) -> Poll<ProtocolsHandlerEvent<Self::OutboundProtocol, Self::OutboundOpenInfo, Self::OutEvent, Self::Error>> {
fn poll(&mut self, cx: &mut Context<'_>) -> Poll<ProtocolsHandlerEvent<Self::OutboundProtocol, Self::OutboundOpenInfo, Self::OutEvent, Self::Error>> {
match self.proto1.poll(cx) {
Poll::Ready(ProtocolsHandlerEvent::Custom(event)) => {