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:
Alexis Sellier
2022-10-18 13:03:34 +02:00
parent 1df5cf0c45
commit ae95b229f5
5 changed files with 6 additions and 4 deletions
-1
View File
@@ -1,4 +1,3 @@
#![allow(dead_code)]
pub mod address;
pub mod client;
pub mod clock;
+1
View File
@@ -41,6 +41,7 @@ impl Log for Logger {
fn flush(&self) {}
}
#[allow(dead_code)]
pub fn init(level: Level) {
let logger = Logger { level };
+1
View File
@@ -1,3 +1,4 @@
#![allow(dead_code)]
use std::collections::BTreeMap;
use std::iter;
use std::net;
+1
View File
@@ -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;
+3 -3
View File
@@ -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,
}
}