Update crate to Rust 2018 (#383)

This commit is contained in:
Jakub Beránek
2019-07-23 19:18:43 +02:00
committed by Sean McArthur
parent b3351e675b
commit db6b841e67
68 changed files with 478 additions and 660 deletions

View File

@@ -1,6 +1,6 @@
use codec::Codec;
use frame::Ping;
use proto::{self, PingPayload};
use crate::codec::Codec;
use crate::frame::Ping;
use crate::proto::{self, PingPayload};
use bytes::Buf;
use futures::{Async, Poll};
@@ -107,7 +107,7 @@ impl PingPong {
&Ping::SHUTDOWN,
"pending_ping should be for shutdown",
);
trace!("recv PING SHUTDOWN ack");
log::trace!("recv PING SHUTDOWN ack");
return ReceivedPing::Shutdown;
}
@@ -117,7 +117,7 @@ impl PingPong {
if let Some(ref users) = self.user_pings {
if ping.payload() == &Ping::USER && users.receive_pong() {
trace!("recv PING USER ack");
log::trace!("recv PING USER ack");
return ReceivedPing::Unknown;
}
}
@@ -125,7 +125,7 @@ impl PingPong {
// else we were acked a ping we didn't send?
// The spec doesn't require us to do anything about this,
// so for resiliency, just ignore it for now.
warn!("recv PING ack that we never sent: {:?}", ping);
log::warn!("recv PING ack that we never sent: {:?}", ping);
ReceivedPing::Unknown
} else {
// Save the ping's payload to be sent as an acknowledgement.