Skip to content

Commit

Permalink
Cargo clippy & fmt pass 2
Browse files Browse the repository at this point in the history
  • Loading branch information
sydhds committed Sep 30, 2024
1 parent 4f0f905 commit c3e1c9c
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions massa-bootstrap/src/tests/binders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl BootstrapClientBinder {
}
pub(crate) fn test_default_config() -> BootstrapClientConfig {
BootstrapClientConfig {
rate_limit: std::u64::MAX,
rate_limit: u64::MAX,
max_listeners_per_peer: MAX_LISTENERS_PER_PEER as u32,
endorsement_count: ENDORSEMENT_COUNT,
max_advertise_length: MAX_ADVERTISE_LENGTH,
Expand Down Expand Up @@ -131,7 +131,7 @@ fn init_server_client_pair() -> (BootstrapServerBinder, BootstrapClientBinder) {
server.0,
server_keypair.clone(),
BootstrapSrvBindCfg {
rate_limit: std::u64::MAX,
rate_limit: u64::MAX,
thread_count: THREAD_COUNT,
max_datastore_key_length: MAX_DATASTORE_KEY_LENGTH,
randomness_size_bytes: BOOTSTRAP_RANDOMNESS_SIZE_BYTES,
Expand Down
2 changes: 1 addition & 1 deletion massa-bootstrap/src/tests/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl Default for BootstrapConfig {
max_simultaneous_bootstraps: 2,
ip_list_max_size: 10,
per_ip_min_interval: MassaTime::from_millis(10000),
rate_limit: std::u64::MAX,
rate_limit: u64::MAX,
max_datastore_key_length: MAX_DATASTORE_KEY_LENGTH,
randomness_size_bytes: BOOTSTRAP_RANDOMNESS_SIZE_BYTES,
thread_count: THREAD_COUNT,
Expand Down
4 changes: 2 additions & 2 deletions massa-bootstrap/src/tests/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use massa_serialization::{DeserializeError, Deserializer, Serializer};
#[test]
fn test_serialize_bootstrap_server_message() {
let config = BootstrapClientConfig {
rate_limit: std::u64::MAX,
rate_limit: u64::MAX,
max_listeners_per_peer: MAX_LISTENERS_PER_PEER as u32,
endorsement_count: ENDORSEMENT_COUNT,
max_advertise_length: MAX_ADVERTISE_LENGTH,
Expand Down Expand Up @@ -147,7 +147,7 @@ fn test_serialize_error_cases_clientmsg() {
#[test]
fn test_serialize_error_cases_servermsg() {
let config = BootstrapClientConfig {
rate_limit: std::u64::MAX,
rate_limit: u64::MAX,
max_listeners_per_peer: MAX_LISTENERS_PER_PEER as u32,
endorsement_count: ENDORSEMENT_COUNT,
max_advertise_length: MAX_ADVERTISE_LENGTH,
Expand Down
2 changes: 1 addition & 1 deletion massa-bootstrap/src/tests/tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ pub fn get_bootstrap_config(bootstrap_public_key: NodeId) -> BootstrapConfig {
max_simultaneous_bootstraps: 2,
ip_list_max_size: 10,
per_ip_min_interval: MassaTime::from_millis(10000),
rate_limit: std::u64::MAX,
rate_limit: u64::MAX,
max_datastore_key_length: MAX_DATASTORE_KEY_LENGTH,
randomness_size_bytes: BOOTSTRAP_RANDOMNESS_SIZE_BYTES,
thread_count: THREAD_COUNT,
Expand Down
1 change: 1 addition & 0 deletions massa-execution-worker/src/tests/universe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ impl ExecutionForeignControllers {
}
}

#[allow(dead_code)]
pub struct ExecutionTestUniverse {
pub module_controller: Box<dyn ExecutionController>,
pub storage: Storage,
Expand Down
1 change: 1 addition & 0 deletions massa-protocol-worker/src/tests/universe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ use num::rational::Ratio;
use std::ops::Bound::Included;
use tracing::{debug, log::warn};

#[allow(dead_code)]
pub struct ProtocolTestUniverse {
pub module_controller: Box<dyn ProtocolController>,
module_manager: Box<dyn ProtocolManager>,
Expand Down
1 change: 1 addition & 0 deletions massa-versioning/src/versioning_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ mod test {
}
}

#[allow(dead_code)]
#[derive(Debug)]
enum TestAddress {
V0(TestAddressV0),
Expand Down

0 comments on commit c3e1c9c

Please sign in to comment.