clippy
This commit is contained in:
@@ -29,13 +29,6 @@ pub struct Config {
|
||||
pub wg_score_thresholds: Option<ScoreThresholds>,
|
||||
}
|
||||
|
||||
fn to_string<T: fmt::Display>(value: &Option<T>) -> String {
|
||||
match value {
|
||||
Some(value) => value.to_string(),
|
||||
None => "unset".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Config {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "nyxd_url: {}, api_url: {}", self.nyxd_url, self.api_url,)
|
||||
@@ -110,6 +103,7 @@ impl GatewayClient {
|
||||
user_agent: UserAgent,
|
||||
_static_nym_api_ip_addresses: Option<&[SocketAddr]>,
|
||||
) -> Result<Self> {
|
||||
#[allow(deprecated)]
|
||||
let api_client = nym_http_api_client::ClientBuilder::from_network(network_details)
|
||||
.map_err(Box::new)?
|
||||
.with_user_agent(user_agent.clone())
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use crate::ScoreValue;
|
||||
use nym_contracts_common::Percent;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
|
||||
@@ -98,21 +97,6 @@ pub struct Asn {
|
||||
pub kind: AsnKind,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Entry {
|
||||
pub can_connect: bool,
|
||||
pub can_route: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Exit {
|
||||
pub can_connect: bool,
|
||||
pub can_route_ip_v4: bool,
|
||||
pub can_route_ip_external_v4: bool,
|
||||
pub can_route_ip_v6: bool,
|
||||
pub can_route_ip_external_v6: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize)]
|
||||
pub struct Location {
|
||||
pub two_letter_iso_country_code: String,
|
||||
@@ -124,11 +108,3 @@ pub struct Location {
|
||||
|
||||
pub asn: Option<Asn>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize)]
|
||||
pub struct DVpnGatewayPerformance {
|
||||
pub last_updated_utc: String,
|
||||
pub score: ScoreValue,
|
||||
pub load: ScoreValue,
|
||||
pub uptime_percentage_last_24_hours: f32,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user