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 address;
|
||||||
pub mod client;
|
pub mod client;
|
||||||
pub mod clock;
|
pub mod clock;
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ impl Log for Logger {
|
||||||
fn flush(&self) {}
|
fn flush(&self) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn init(level: Level) {
|
pub fn init(level: Level) {
|
||||||
let logger = Logger { level };
|
let logger = Logger { level };
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
#![allow(dead_code)]
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::iter;
|
use std::iter;
|
||||||
use std::net;
|
use std::net;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
//! A simple P2P network simulator. Acts as the _reactor_, but without doing any I/O.
|
//! A simple P2P network simulator. Acts as the _reactor_, but without doing any I/O.
|
||||||
#![allow(clippy::collapsible_if)]
|
#![allow(clippy::collapsible_if)]
|
||||||
|
#![allow(dead_code)]
|
||||||
|
|
||||||
#[cfg(feature = "quickcheck")]
|
#[cfg(feature = "quickcheck")]
|
||||||
pub mod arbitrary;
|
pub mod arbitrary;
|
||||||
|
|
|
||||||
|
|
@ -15,19 +15,19 @@ use crate::wire::Wire;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct Peer {
|
struct Peer {
|
||||||
addr: net::SocketAddr,
|
_addr: net::SocketAddr,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Transport<R, S, T, G> {
|
pub struct Transport<R, S, T, G> {
|
||||||
peers: HashMap<net::IpAddr, Peer>,
|
_peers: HashMap<net::IpAddr, Peer>,
|
||||||
inner: Wire<R, S, T, G>,
|
inner: Wire<R, S, T, G>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<R, S, T, G> Transport<R, S, T, G> {
|
impl<R, S, T, G> Transport<R, S, T, G> {
|
||||||
pub fn new(inner: Wire<R, S, T, G>) -> Self {
|
pub fn new(inner: Wire<R, S, T, G>) -> Self {
|
||||||
Self {
|
Self {
|
||||||
peers: HashMap::default(),
|
_peers: HashMap::default(),
|
||||||
inner,
|
inner,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue