mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-16 08:10:40 +08:00
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:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user