Skip to content

Commit 0b423a9

Browse files
committed
clippy
1 parent bc96ea0 commit 0b423a9

File tree

5 files changed

+27
-27
lines changed

5 files changed

+27
-27
lines changed

clients/client-core/src/config/old_config_v1_1_13.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ use std::time::Duration;
2020

2121
#[derive(Debug, Clone, Deserialize, PartialEq, Serialize)]
2222
#[serde(deny_unknown_fields)]
23-
pub struct OldConfig_v1_1_13<T> {
23+
pub struct OldConfigV1_1_13<T> {
2424
pub client: Client<T>,
2525

2626
#[serde(default)]
2727
logging: Logging,
2828
#[serde(default)]
29-
debug: OldDebugConfig_v_1_1_13,
29+
debug: OldDebugConfigV1_1_13,
3030
}
3131

32-
impl<T: NymConfig> Default for OldConfig_v1_1_13<T> {
32+
impl<T: NymConfig> Default for OldConfigV1_1_13<T> {
3333
fn default() -> Self {
34-
OldConfig_v1_1_13 {
34+
OldConfigV1_1_13 {
3535
client: Client::<T>::default(),
3636
logging: Default::default(),
3737
debug: Default::default(),
@@ -41,7 +41,7 @@ impl<T: NymConfig> Default for OldConfig_v1_1_13<T> {
4141

4242
#[derive(Debug, Clone, Deserialize, PartialEq, Serialize)]
4343
#[serde(default, deny_unknown_fields)]
44-
pub struct OldDebugConfig_v_1_1_13 {
44+
pub struct OldDebugConfigV1_1_13 {
4545
#[serde(with = "humantime_serde")]
4646
pub average_packet_delay: Duration,
4747

@@ -96,8 +96,8 @@ pub struct OldDebugConfig_v_1_1_13 {
9696
pub maximum_reply_key_age: Duration,
9797
}
9898

99-
impl From<OldDebugConfig_v_1_1_13> for DebugConfig {
100-
fn from(value: OldDebugConfig_v_1_1_13) -> Self {
99+
impl From<OldDebugConfigV1_1_13> for DebugConfig {
100+
fn from(value: OldDebugConfigV1_1_13) -> Self {
101101
DebugConfig {
102102
traffic: Traffic {
103103
average_packet_delay: value.average_packet_delay,
@@ -140,9 +140,9 @@ impl From<OldDebugConfig_v_1_1_13> for DebugConfig {
140140
}
141141
}
142142

143-
impl Default for OldDebugConfig_v_1_1_13 {
143+
impl Default for OldDebugConfigV1_1_13 {
144144
fn default() -> Self {
145-
OldDebugConfig_v_1_1_13 {
145+
OldDebugConfigV1_1_13 {
146146
average_packet_delay: DEFAULT_AVERAGE_PACKET_DELAY,
147147
average_ack_delay: DEFAULT_AVERAGE_PACKET_DELAY,
148148
ack_wait_multiplier: DEFAULT_ACK_WAIT_MULTIPLIER,
@@ -169,8 +169,8 @@ impl Default for OldDebugConfig_v_1_1_13 {
169169
}
170170
}
171171

172-
impl<T, U> From<OldConfig_v1_1_13<T>> for Config<U> {
173-
fn from(value: OldConfig_v1_1_13<T>) -> Self {
172+
impl<T, U> From<OldConfigV1_1_13<T>> for Config<U> {
173+
fn from(value: OldConfigV1_1_13<T>) -> Self {
174174
Config {
175175
client: Client {
176176
version: value.client.version,

clients/native/src/client/config/old_config_v1_1_13.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
use crate::client::config::{Config, Socket};
5-
use client_core::config::old_config_v1_1_13::OldConfig_v1_1_13 as OldBaseConfig;
5+
use client_core::config::old_config_v1_1_13::OldConfigV1_1_13 as OldBaseConfigV1_1_13;
66
use nym_config::NymConfig;
77
use serde::{Deserialize, Serialize};
88
use std::path::PathBuf;
99

1010
#[derive(Debug, Default, Deserialize, PartialEq, Serialize)]
1111
#[serde(deny_unknown_fields)]
12-
pub struct OldConfig_v1_1_13 {
12+
pub struct OldConfigV1_1_13 {
1313
#[serde(flatten)]
14-
base: OldBaseConfig<OldConfig_v1_1_13>,
14+
base: OldBaseConfigV1_1_13<OldConfigV1_1_13>,
1515

1616
socket: Socket,
1717
}
1818

19-
impl NymConfig for OldConfig_v1_1_13 {
19+
impl NymConfig for OldConfigV1_1_13 {
2020
fn template() -> &'static str {
2121
// not intended to be used
2222
unimplemented!()
@@ -50,8 +50,8 @@ impl NymConfig for OldConfig_v1_1_13 {
5050
}
5151
}
5252

53-
impl From<OldConfig_v1_1_13> for Config {
54-
fn from(value: OldConfig_v1_1_13) -> Self {
53+
impl From<OldConfigV1_1_13> for Config {
54+
fn from(value: OldConfigV1_1_13) -> Self {
5555
Config {
5656
base: value.base.into(),
5757
socket: value.socket,

clients/native/src/commands/run.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::{
1010
error::ClientError,
1111
};
1212

13-
use crate::client::config::old_config_v1_1_13::OldConfig_v1_1_13;
13+
use crate::client::config::old_config_v1_1_13::OldConfigV1_1_13;
1414
use clap::Args;
1515
use log::*;
1616
use nym_bin_common::version_checker::is_minor_version_compatible;
@@ -106,7 +106,7 @@ fn load_config(id: &str) -> Result<Config, Box<dyn Error + Send + Sync>> {
106106
warn!("Failed to load config for {id} - {err}...\nAttempting to use the old config template...");
107107

108108
// if this failed, try to use the old template
109-
let old_config = match OldConfig_v1_1_13::load_from_file(id) {
109+
let old_config = match OldConfigV1_1_13::load_from_file(id) {
110110
Ok(cfg) => {
111111
info!("Managed to load config for {id} using old template");
112112
cfg

clients/socks5/src/client/config/old_config_v1_1_13.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
use crate::client::config::{Config, Socks5, Socks5Debug};
5-
use client_core::config::old_config_v1_1_13::OldConfig_v1_1_13 as OldBaseConfig;
5+
use client_core::config::old_config_v1_1_13::OldConfigV1_1_13 as OldBaseConfigV1_1_13;
66
use nym_config::NymConfig;
77
use serde::{Deserialize, Serialize};
88
use std::path::PathBuf;
99

1010
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1111
#[serde(deny_unknown_fields)]
12-
pub struct OldConfig_v1_1_13 {
12+
pub struct OldConfigV1_1_13 {
1313
#[serde(flatten)]
14-
base: OldBaseConfig<OldConfig_v1_1_13>,
14+
base: OldBaseConfigV1_1_13<OldConfigV1_1_13>,
1515

1616
socks5: Socks5,
1717

1818
#[serde(default)]
1919
socks5_debug: Socks5Debug,
2020
}
2121

22-
impl NymConfig for OldConfig_v1_1_13 {
22+
impl NymConfig for OldConfigV1_1_13 {
2323
fn template() -> &'static str {
2424
// not intended to be used
2525
unimplemented!()
@@ -55,8 +55,8 @@ impl NymConfig for OldConfig_v1_1_13 {
5555
}
5656
}
5757

58-
impl From<OldConfig_v1_1_13> for Config {
59-
fn from(value: OldConfig_v1_1_13) -> Self {
58+
impl From<OldConfigV1_1_13> for Config {
59+
fn from(value: OldConfigV1_1_13) -> Self {
6060
Config {
6161
base: value.base.into(),
6262
socks5: value.socks5,

clients/socks5/src/commands/run.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::{
77
error::Socks5ClientError,
88
};
99

10-
use crate::client::config::old_config_v1_1_13::OldConfig_v1_1_13;
10+
use crate::client::config::old_config_v1_1_13::OldConfigV1_1_13;
1111
use clap::Args;
1212
use log::*;
1313
use nym_bin_common::version_checker::is_minor_version_compatible;
@@ -114,7 +114,7 @@ fn load_config(id: &str) -> Result<Config, Box<dyn std::error::Error + Send + Sy
114114
warn!("Failed to load config for {id} - {err}...\nAttempting to use the old config template...");
115115

116116
// if this failed, try to use the old template
117-
let old_config = match OldConfig_v1_1_13::load_from_file(id) {
117+
let old_config = match OldConfigV1_1_13::load_from_file(id) {
118118
Ok(cfg) => {
119119
info!("Managed to load config for {id} using old template");
120120
cfg

0 commit comments

Comments
 (0)