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