Suppress unused import warnings.
This commit is contained in:
parent
ed2ee9d42f
commit
c3ec235a5b
|
@ -5,12 +5,9 @@ use std::{
|
|||
collections::{BTreeSet, HashMap},
|
||||
iter::Extend,
|
||||
net::SocketAddr,
|
||||
sync::{Arc, Mutex},
|
||||
};
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use futures::channel::mpsc;
|
||||
use tokio::prelude::*;
|
||||
use tracing::Span;
|
||||
|
||||
use crate::{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use std::sync::{Arc, Mutex};
|
||||
use std::sync::Arc;
|
||||
|
||||
use futures::{
|
||||
channel::{mpsc, oneshot},
|
||||
|
@ -259,7 +259,10 @@ where
|
|||
.expect("response oneshot should be unused");
|
||||
AwaitingRequest
|
||||
}
|
||||
(AwaitingResponse(Ping(req_nonce), tx), Message::Pong(res_nonce)) => {
|
||||
// In this special case, we ignore tx, because we handle ping/pong
|
||||
// messages internally; the "shadow client" only serves to generate
|
||||
// outbound pings for us to process.
|
||||
(AwaitingResponse(Ping(req_nonce), _tx), Message::Pong(res_nonce)) => {
|
||||
if req_nonce != res_nonce {
|
||||
self.fail_with(PeerError::HeartbeatNonceMismatch);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
use std::{
|
||||
net::SocketAddr,
|
||||
pin::Pin,
|
||||
sync::{Arc, Mutex},
|
||||
time::Duration,
|
||||
};
|
||||
|
@ -26,11 +25,9 @@ use tower::{
|
|||
Service, ServiceExt,
|
||||
};
|
||||
use tower_load::{peak_ewma::PeakEwmaDiscover, NoInstrument};
|
||||
use tracing::Level;
|
||||
use tracing_futures::Instrument;
|
||||
|
||||
use crate::{
|
||||
peer::{HandshakeError, PeerClient, PeerConnector, PeerHandshake},
|
||||
peer::{PeerClient, PeerConnector, PeerHandshake},
|
||||
timestamp_collector::TimestampCollector,
|
||||
AddressBook, BoxedStdError, Config, Request, Response,
|
||||
};
|
||||
|
@ -86,7 +83,7 @@ where
|
|||
let (demand_tx, demand_rx) = mpsc::channel::<()>(100);
|
||||
|
||||
// Connect the rx end to a PeerSet, wrapping new peers in load instruments.
|
||||
let mut peer_set = Buffer::new(
|
||||
let peer_set = Buffer::new(
|
||||
PeerSet::new(
|
||||
PeakEwmaDiscover::new(
|
||||
ServiceStream::new(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use chrono::{TimeZone, Utc};
|
||||
use futures::stream::{FuturesUnordered, Stream, StreamExt};
|
||||
use chrono::Utc;
|
||||
use futures::stream::{FuturesUnordered, StreamExt};
|
||||
use tower::{Service, ServiceExt};
|
||||
use tracing::Level;
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ use std::{
|
|||
collections::HashMap,
|
||||
fmt::Debug,
|
||||
marker::PhantomData,
|
||||
net::SocketAddr,
|
||||
pin::Pin,
|
||||
task::{Context, Poll},
|
||||
};
|
||||
|
@ -20,7 +19,6 @@ use tower::{
|
|||
use tower_load::Load;
|
||||
|
||||
use crate::{
|
||||
peer::{PeerClient, PeerError},
|
||||
protocol::internal::{Request, Response},
|
||||
BoxedStdError,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue