From 757a89c5d7cf1541ca79f98ee0df5ab90d8fe4db Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Thu, 23 Oct 2025 09:36:22 +0100 Subject: [PATCH] clippy --- nym-gateway-directory/src/gateway_client.rs | 8 +------ nym-gateway-directory/src/helpers.rs | 24 --------------------- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/nym-gateway-directory/src/gateway_client.rs b/nym-gateway-directory/src/gateway_client.rs index 180f6cf1c9..dfb9b7d0c2 100644 --- a/nym-gateway-directory/src/gateway_client.rs +++ b/nym-gateway-directory/src/gateway_client.rs @@ -29,13 +29,6 @@ pub struct Config { pub wg_score_thresholds: Option, } -fn to_string(value: &Option) -> 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 { + #[allow(deprecated)] let api_client = nym_http_api_client::ClientBuilder::from_network(network_details) .map_err(Box::new)? .with_user_agent(user_agent.clone()) diff --git a/nym-gateway-directory/src/helpers.rs b/nym-gateway-directory/src/helpers.rs index ba6995f655..3583868a90 100644 --- a/nym-gateway-directory/src/helpers.rs +++ b/nym-gateway-directory/src/helpers.rs @@ -1,7 +1,6 @@ // Copyright 2023 - Nym Technologies SA // 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, } - -#[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, -}