Skip to content

Commit

Permalink
Cargo check / clippy / fmt fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sydhds committed Sep 27, 2024
1 parent 2a7729d commit 184cfcd
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions massa-bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ use massa_consensus_exports::bootstrapable_graph::BootstrapableGraph;
use massa_final_state::FinalStateController;
use massa_protocol_exports::BootstrapPeers;
use parking_lot::RwLock;
use std::io::{self, ErrorKind};
use std::sync::Arc;
use std::time::{Duration, Instant};

mod bindings;
mod client;
Expand Down Expand Up @@ -66,6 +64,7 @@ impl GlobalBootstrapState {
}
}

/*
trait BindingReadExact: io::Read {
/// similar to std::io::Read::read_exact, but with a timeout that is function-global instead of per-individual-read
fn read_exact_timeout(
Expand Down Expand Up @@ -112,3 +111,4 @@ trait BindingReadExact: io::Read {
/// Internal helper
fn set_read_timeout(&mut self, deadline: Option<Duration>) -> Result<(), std::io::Error>;
}
*/
4 changes: 4 additions & 0 deletions massa-bootstrap/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,15 @@ use crate::{
white_black_list::SharedWhiteBlackList,
BootstrapConfig,
};

/*
/// Specifies a common interface that can be used by standard, or mockers
#[cfg_attr(test, mockall::automock)]
pub trait BSEventPoller {
fn poll(&mut self) -> Result<PollEvent, BootstrapError>;
}
*/

/// Abstraction layer over data produced by the listener, and transported
/// over to the worker via a channel

Expand Down
1 change: 1 addition & 0 deletions massa-client/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ lazy_static::lazy_static! {
pub static ref SETTINGS: Settings = build_massa_settings("massa-client", "MASSA_CLIENT");
}

#[allow(dead_code)]
#[derive(Debug, Deserialize, Clone)]
pub struct Settings {
pub default_node: DefaultNode,
Expand Down
2 changes: 2 additions & 0 deletions massa-node/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ pub struct FactorySettings {
}

/// Pool configuration, read from a file configuration
#[allow(dead_code)]
#[derive(Debug, Deserialize, Clone)]
pub struct PoolSettings {
pub max_operation_pool_size: usize,
Expand Down Expand Up @@ -194,6 +195,7 @@ pub struct MetricsSettings {
}

/// Protocol Configuration, read from toml user configuration file
#[allow(dead_code)]
#[derive(Debug, Deserialize, Clone)]
pub struct ProtocolSettings {
/// after `ask_block_timeout` milliseconds we try to ask a block to another node
Expand Down
1 change: 1 addition & 0 deletions massa-protocol-worker/src/handlers/peer_handler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ mod tester;

pub(crate) use messages::{PeerManagementMessage, PeerManagementMessageSerializer};

#[allow(dead_code)]
pub struct PeerManagementHandler {
pub peer_db: SharedPeerDB,
pub thread_join: Option<JoinHandle<()>>,
Expand Down
1 change: 1 addition & 0 deletions massa-protocol-worker/src/handlers/peer_handler/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ pub enum PeerManagementCmd {
Stop,
}

#[allow(dead_code)]
pub struct PeerManagementChannel {
pub msg_sender: MassaSender<PeerMessageTuple>,
pub command_sender: MassaSender<PeerManagementCmd>,
Expand Down
1 change: 1 addition & 0 deletions massa-protocol-worker/src/wrap_network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ impl ActiveConnectionsTrait for SharedActiveConnections<PeerId> {
}
}

#[allow(dead_code)]
#[cfg_attr(test, mockall::automock)]
pub trait NetworkController: Send + Sync {
fn get_active_connections(&self) -> Box<dyn ActiveConnectionsTrait>;
Expand Down

0 comments on commit 184cfcd

Please sign in to comment.