Activate lint for dead-code checking
For test code, we need it in a couple of places. Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
This commit is contained in:
parent
1df5cf0c45
commit
ae95b229f5
|
|
@ -1,4 +1,3 @@
|
|||
#![allow(dead_code)]
|
||||
pub mod address;
|
||||
pub mod client;
|
||||
pub mod clock;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ impl Log for Logger {
|
|||
fn flush(&self) {}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn init(level: Level) {
|
||||
let logger = Logger { level };
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#![allow(dead_code)]
|
||||
use std::collections::BTreeMap;
|
||||
use std::iter;
|
||||
use std::net;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
//! A simple P2P network simulator. Acts as the _reactor_, but without doing any I/O.
|
||||
#![allow(clippy::collapsible_if)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
#[cfg(feature = "quickcheck")]
|
||||
pub mod arbitrary;
|
||||
|
|
|
|||
|
|
@ -15,19 +15,19 @@ use crate::wire::Wire;
|
|||
|
||||
#[derive(Debug)]
|
||||
struct Peer {
|
||||
addr: net::SocketAddr,
|
||||
_addr: net::SocketAddr,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Transport<R, S, T, G> {
|
||||
peers: HashMap<net::IpAddr, Peer>,
|
||||
_peers: HashMap<net::IpAddr, Peer>,
|
||||
inner: Wire<R, S, T, G>,
|
||||
}
|
||||
|
||||
impl<R, S, T, G> Transport<R, S, T, G> {
|
||||
pub fn new(inner: Wire<R, S, T, G>) -> Self {
|
||||
Self {
|
||||
peers: HashMap::default(),
|
||||
_peers: HashMap::default(),
|
||||
inner,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue