linting
This commit is contained in:
@@ -6,7 +6,7 @@ pub enum Error {
|
||||
#[error("identity not formatted correctly: {identity}")]
|
||||
NodeIdentityFormattingError {
|
||||
identity: String,
|
||||
source: nym_crypto::asymmetric::ed25519::Ed25519RecoveryError
|
||||
source: nym_crypto::asymmetric::ed25519::Ed25519RecoveryError,
|
||||
},
|
||||
|
||||
#[error("recipient is not formatted correctly: {address}")]
|
||||
|
||||
@@ -6,7 +6,7 @@ use std::net::{IpAddr, SocketAddr};
|
||||
use nym_common::trace_err_chain;
|
||||
use nym_http_api_client::HickoryDnsResolver;
|
||||
|
||||
use crate::{Config, Error, error::Result, gateway_client::ResolvedConfig};
|
||||
use crate::{error::Result, gateway_client::ResolvedConfig, Config, Error};
|
||||
|
||||
async fn try_resolve_hostname(hostname: &str) -> Result<Vec<IpAddr>> {
|
||||
tracing::debug!("Trying to resolve hostname: {hostname}");
|
||||
|
||||
@@ -13,6 +13,7 @@ use tokio::time::sleep;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
use tracing::{debug, error};
|
||||
|
||||
use super::error::{Error, Result};
|
||||
use crate::{
|
||||
ip_packet_client::current::{
|
||||
request::IpPacketRequest,
|
||||
@@ -23,8 +24,6 @@ use crate::{
|
||||
},
|
||||
ip_packet_client::helpers::check_ipr_message_version,
|
||||
};
|
||||
use super::error::{Error, Result};
|
||||
|
||||
|
||||
pub type SharedMixnetClient = Arc<tokio::sync::Mutex<Option<MixnetClient>>>;
|
||||
|
||||
|
||||
@@ -33,12 +33,11 @@ pub enum IprListenerError {
|
||||
impl From<super::error::Error> for IprListenerError {
|
||||
fn from(err: super::error::Error) -> Self {
|
||||
match err {
|
||||
super::error::Error::SdkError(sdk_err) => {
|
||||
IprListenerError::IprClientError(*sdk_err)
|
||||
}
|
||||
other => IprListenerError::IprClientError(
|
||||
crate::Error::new_unsupported(format!("IP packet error: {}", other))
|
||||
)
|
||||
super::error::Error::SdkError(sdk_err) => IprListenerError::IprClientError(*sdk_err),
|
||||
other => IprListenerError::IprClientError(crate::Error::new_unsupported(format!(
|
||||
"IP packet error: {}",
|
||||
other
|
||||
))),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@ use std::task::{Context, Poll};
|
||||
use std::time::Duration;
|
||||
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
|
||||
use tokio::sync::RwLockReadGuard;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
use tokio_util::codec::{Encoder, FramedRead, FramedWrite};
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
/// Client connected to the Nym mixnet.
|
||||
pub struct MixnetClient {
|
||||
|
||||
Reference in New Issue
Block a user