diff --git a/packages/ciphernode/net/src/correlation_id.rs b/packages/ciphernode/net/src/correlation_id.rs index 3d14bcab..2d82c37e 100644 --- a/packages/ciphernode/net/src/correlation_id.rs +++ b/packages/ciphernode/net/src/correlation_id.rs @@ -5,7 +5,7 @@ use std::{ static NEXT_CORRELATION_ID: AtomicUsize = AtomicUsize::new(1); -#[derive(Debug,Clone)] +#[derive(Debug, Clone)] pub struct CorrelationId { id: usize, } diff --git a/packages/ciphernode/net/src/lib.rs b/packages/ciphernode/net/src/lib.rs index 394055bf..35d4f37e 100644 --- a/packages/ciphernode/net/src/lib.rs +++ b/packages/ciphernode/net/src/lib.rs @@ -1,13 +1,12 @@ #![crate_name = "net"] #![crate_type = "lib"] -mod network_manager; -mod network_peer; +pub mod correlation_id; mod dialer; pub mod events; +mod network_manager; +mod network_peer; mod retry; -pub mod correlation_id; pub use network_manager::*; pub use network_peer::*; - diff --git a/packages/ciphernode/net/src/network_manager.rs b/packages/ciphernode/net/src/network_manager.rs index bea06e38..5032c36d 100644 --- a/packages/ciphernode/net/src/network_manager.rs +++ b/packages/ciphernode/net/src/network_manager.rs @@ -103,13 +103,7 @@ impl NetworkManager { // Create peer from keypair let keypair: libp2p::identity::Keypair = ed25519::Keypair::try_from_bytes(&mut bytes)?.try_into()?; - let mut peer = NetworkPeer::new( - &keypair, - peers, - Some(quic_port), - topic, - enable_mdns, - )?; + let mut peer = NetworkPeer::new(&keypair, peers, Some(quic_port), topic, enable_mdns)?; // Setup and start network manager let rx = peer.rx(); diff --git a/packages/ciphernode/net/src/retry.rs b/packages/ciphernode/net/src/retry.rs index 55ab151e..5065c467 100644 --- a/packages/ciphernode/net/src/retry.rs +++ b/packages/ciphernode/net/src/retry.rs @@ -1,5 +1,5 @@ -use std::{future::Future, time::Duration}; use anyhow::Result; +use std::{future::Future, time::Duration}; use tokio::time::sleep; pub enum RetryError { @@ -67,5 +67,3 @@ where } } } - -