From 3816142479c673da7d57fcfd4321e2b8ed3bb956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Tue, 2 Jan 2024 10:06:26 +0000 Subject: [PATCH] ignoring unused imports created in macro expansions --- explorer-api/src/country_statistics/http.rs | 3 +++ explorer-api/src/gateways/http.rs | 3 +++ explorer-api/src/mix_node/http.rs | 3 +++ explorer-api/src/mix_nodes/http.rs | 3 +++ explorer-api/src/overview/http.rs | 3 +++ explorer-api/src/ping/http.rs | 3 +++ explorer-api/src/service_providers/http.rs | 3 +++ explorer-api/src/validators/http.rs | 3 +++ nym-api/src/circulating_supply_api/routes.rs | 3 +++ nym-api/src/coconut/api_routes/mod.rs | 3 +++ nym-api/src/network/routes.rs | 3 +++ nym-api/src/node_status_api/routes.rs | 3 +++ nym-api/src/nym_contract_cache/routes.rs | 3 +++ nym-api/src/nym_nodes/routes.rs | 3 +++ service-providers/network-requester/src/config/mod.rs | 1 - .../network-statistics/src/api/routes.rs | 11 ++++++----- 16 files changed, 48 insertions(+), 6 deletions(-) diff --git a/explorer-api/src/country_statistics/http.rs b/explorer-api/src/country_statistics/http.rs index 45259f11dc..f51b8d242e 100644 --- a/explorer-api/src/country_statistics/http.rs +++ b/explorer-api/src/country_statistics/http.rs @@ -1,3 +1,6 @@ +// due to the macro expansion of rather old rocket macros... +#![allow(unused_imports)] + use crate::country_statistics::country_nodes_distribution::CountryNodesDistribution; use crate::state::ExplorerApiStateContext; use rocket::serde::json::Json; diff --git a/explorer-api/src/gateways/http.rs b/explorer-api/src/gateways/http.rs index ac0d85c0b1..f47ea51146 100644 --- a/explorer-api/src/gateways/http.rs +++ b/explorer-api/src/gateways/http.rs @@ -1,6 +1,9 @@ // Copyright 2022 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +// due to the macro expansion of rather old rocket macros... +#![allow(unused_imports)] + use nym_explorer_api_requests::PrettyDetailedGatewayBond; use rocket::response::status::NotFound; use rocket::serde::json::Json; diff --git a/explorer-api/src/mix_node/http.rs b/explorer-api/src/mix_node/http.rs index e00ed8ff82..f1d2738db7 100644 --- a/explorer-api/src/mix_node/http.rs +++ b/explorer-api/src/mix_node/http.rs @@ -1,6 +1,9 @@ // Copyright 2022 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +// due to the macro expansion of rather old rocket macros... +#![allow(unused_imports)] + use crate::mix_node::delegations::{ get_single_mixnode_delegations, get_single_mixnode_delegations_summed, }; diff --git a/explorer-api/src/mix_nodes/http.rs b/explorer-api/src/mix_nodes/http.rs index a36843b66f..5043a559e6 100644 --- a/explorer-api/src/mix_nodes/http.rs +++ b/explorer-api/src/mix_nodes/http.rs @@ -1,3 +1,6 @@ +// due to the macro expansion of rather old rocket macros... +#![allow(unused_imports)] + use crate::mix_nodes::models::{MixNodeActiveSetSummary, MixNodeSummary}; use crate::state::ExplorerApiStateContext; use nym_explorer_api_requests::{MixnodeStatus, PrettyDetailedMixNodeBond}; diff --git a/explorer-api/src/overview/http.rs b/explorer-api/src/overview/http.rs index a5cfb127c5..1f130e68c6 100644 --- a/explorer-api/src/overview/http.rs +++ b/explorer-api/src/overview/http.rs @@ -1,3 +1,6 @@ +// due to the macro expansion of rather old rocket macros... +#![allow(unused_imports)] + use rocket::serde::json::Json; use rocket::{Route, State}; use rocket_okapi::okapi::openapi3::OpenApi; diff --git a/explorer-api/src/ping/http.rs b/explorer-api/src/ping/http.rs index c3cd4107f1..a486c5c7a6 100644 --- a/explorer-api/src/ping/http.rs +++ b/explorer-api/src/ping/http.rs @@ -1,6 +1,9 @@ // Copyright 2021-2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +// due to the macro expansion of rather old rocket macros... +#![allow(unused_imports)] + use nym_mixnet_contract_common::{MixId, MixNode}; use rocket::serde::json::Json; use rocket::{Route, State}; diff --git a/explorer-api/src/service_providers/http.rs b/explorer-api/src/service_providers/http.rs index a942a68755..5da66d9958 100644 --- a/explorer-api/src/service_providers/http.rs +++ b/explorer-api/src/service_providers/http.rs @@ -1,3 +1,6 @@ +// due to the macro expansion of rather old rocket macros... +#![allow(unused_imports)] + use crate::service_providers::models::{ DirectoryService, DirectorySpDetailed, HarbourMasterService, PagedResult, }; diff --git a/explorer-api/src/validators/http.rs b/explorer-api/src/validators/http.rs index 88a06eea01..ee42d2f14b 100644 --- a/explorer-api/src/validators/http.rs +++ b/explorer-api/src/validators/http.rs @@ -1,6 +1,9 @@ // Copyright 2022 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +// due to the macro expansion of rather old rocket macros... +#![allow(unused_imports)] + use rocket::response::status::NotFound; use rocket::serde::json::Json; use rocket::{Route, State}; diff --git a/nym-api/src/circulating_supply_api/routes.rs b/nym-api/src/circulating_supply_api/routes.rs index 5bc76ab8bb..fcf23b67fb 100644 --- a/nym-api/src/circulating_supply_api/routes.rs +++ b/nym-api/src/circulating_supply_api/routes.rs @@ -1,6 +1,9 @@ // Copyright 2022-2023 - Nym Technologies SA // SPDX-License-Identifier: GPL-3.0-only +// due to the macro expansion of rather old rocket macros... +#![allow(unused_imports)] + use crate::circulating_supply_api::cache::CirculatingSupplyCache; use crate::node_status_api::models::ErrorResponse; use nym_api_requests::models::CirculatingSupplyResponse; diff --git a/nym-api/src/coconut/api_routes/mod.rs b/nym-api/src/coconut/api_routes/mod.rs index b783f9c0a2..9110487ade 100644 --- a/nym-api/src/coconut/api_routes/mod.rs +++ b/nym-api/src/coconut/api_routes/mod.rs @@ -1,6 +1,9 @@ // Copyright 2023 - Nym Technologies SA // SPDX-License-Identifier: GPL-3.0-only +// due to the macro expansion of rather old rocket macros... +#![allow(unused_imports)] + use crate::coconut::api_routes::helpers::build_credentials_response; use crate::coconut::error::{CoconutError, Result}; use crate::coconut::helpers::{accepted_vote_err, blind_sign}; diff --git a/nym-api/src/network/routes.rs b/nym-api/src/network/routes.rs index 73625f8b88..5febb8fd75 100644 --- a/nym-api/src/network/routes.rs +++ b/nym-api/src/network/routes.rs @@ -1,6 +1,9 @@ // Copyright 2023 - Nym Technologies SA // SPDX-License-Identifier: GPL-3.0-only +// due to the macro expansion of rather old rocket macros... +#![allow(unused_imports)] + use crate::network::models::{ContractInformation, NetworkDetails}; use crate::nym_contract_cache::cache::NymContractCache; use nym_contracts_common::ContractBuildInformation; diff --git a/nym-api/src/node_status_api/routes.rs b/nym-api/src/node_status_api/routes.rs index 466b10f883..c3b95e3336 100644 --- a/nym-api/src/node_status_api/routes.rs +++ b/nym-api/src/node_status_api/routes.rs @@ -1,6 +1,9 @@ // Copyright 2021-2023 - Nym Technologies SA // SPDX-License-Identifier: GPL-3.0-only +// due to the macro expansion of rather old rocket macros... +#![allow(unused_imports)] + use super::helpers::_get_gateways_detailed; use super::NodeStatusCache; use crate::node_status_api::helpers::{ diff --git a/nym-api/src/nym_contract_cache/routes.rs b/nym-api/src/nym_contract_cache/routes.rs index 01fbab47ac..5573d3a629 100644 --- a/nym-api/src/nym_contract_cache/routes.rs +++ b/nym-api/src/nym_contract_cache/routes.rs @@ -1,6 +1,9 @@ // Copyright 2021-2023 - Nym Technologies SA // SPDX-License-Identifier: GPL-3.0-only +// due to the macro expansion of rather old rocket macros... +#![allow(unused_imports)] + use crate::{ node_status_api::{ helpers::{_get_active_set_detailed, _get_mixnodes_detailed, _get_rewarded_set_detailed}, diff --git a/nym-api/src/nym_nodes/routes.rs b/nym-api/src/nym_nodes/routes.rs index 1df0250844..3dbf62120b 100644 --- a/nym-api/src/nym_nodes/routes.rs +++ b/nym-api/src/nym_nodes/routes.rs @@ -1,6 +1,9 @@ // Copyright 2023 - Nym Technologies SA // SPDX-License-Identifier: GPL-3.0-only +// due to the macro expansion of rather old rocket macros... +#![allow(unused_imports)] + use crate::node_describe_cache::DescribedNodes; use crate::nym_contract_cache::cache::NymContractCache; use crate::support::caching::cache::SharedCache; diff --git a/service-providers/network-requester/src/config/mod.rs b/service-providers/network-requester/src/config/mod.rs index 022b488d57..bce2d5effa 100644 --- a/service-providers/network-requester/src/config/mod.rs +++ b/service-providers/network-requester/src/config/mod.rs @@ -22,7 +22,6 @@ use std::time::Duration; use url::Url; pub use nym_client_core::config::Config as BaseClientConfig; -pub use nym_client_core::config::{DebugConfig, GatewayEndpointConfig}; pub mod old_config_v1_1_13; pub mod old_config_v1_1_20; diff --git a/service-providers/network-statistics/src/api/routes.rs b/service-providers/network-statistics/src/api/routes.rs index 6d36a9f909..632841a675 100644 --- a/service-providers/network-statistics/src/api/routes.rs +++ b/service-providers/network-statistics/src/api/routes.rs @@ -1,14 +1,15 @@ // Copyright 2022 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 -use rocket::serde::json::Json; -use rocket::State; -use serde::{Deserialize, Serialize}; - -use nym_statistics_common::StatsMessage; +// due to the macro expansion of rather old rocket macros... +#![allow(unused_imports)] use crate::api::error::Result; use crate::storage::NetworkStatisticsStorage; +use nym_statistics_common::StatsMessage; +use rocket::serde::json::Json; +use rocket::State; +use serde::{Deserialize, Serialize}; #[derive(Clone, Serialize, Deserialize, Debug)] pub struct StatisticsRequest {