mirror of https://github.com/rapiz1/rathole.git
fix: clippy
This commit is contained in:
parent
9479b9a3a9
commit
2acd62454d
|
@ -40,8 +40,9 @@ impl From<&str> for MaskedString {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq)]
|
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq, Default)]
|
||||||
pub enum TransportType {
|
pub enum TransportType {
|
||||||
|
#[default]
|
||||||
#[serde(rename = "tcp")]
|
#[serde(rename = "tcp")]
|
||||||
Tcp,
|
Tcp,
|
||||||
#[serde(rename = "tls")]
|
#[serde(rename = "tls")]
|
||||||
|
@ -50,12 +51,6 @@ pub enum TransportType {
|
||||||
Noise,
|
Noise,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for TransportType {
|
|
||||||
fn default() -> TransportType {
|
|
||||||
TransportType::Tcp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Per service config
|
/// Per service config
|
||||||
/// All Option are optional in configuration but must be Some value in runtime
|
/// All Option are optional in configuration but must be Some value in runtime
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Default)]
|
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Default)]
|
||||||
|
@ -81,18 +76,16 @@ impl ClientServiceConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
|
||||||
|
#[derive(Default)]
|
||||||
pub enum ServiceType {
|
pub enum ServiceType {
|
||||||
#[serde(rename = "tcp")]
|
#[serde(rename = "tcp")]
|
||||||
|
#[default]
|
||||||
Tcp,
|
Tcp,
|
||||||
#[serde(rename = "udp")]
|
#[serde(rename = "udp")]
|
||||||
Udp,
|
Udp,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for ServiceType {
|
|
||||||
fn default() -> Self {
|
|
||||||
ServiceType::Tcp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn default_service_type() -> ServiceType {
|
fn default_service_type() -> ServiceType {
|
||||||
Default::default()
|
Default::default()
|
||||||
|
|
Loading…
Reference in New Issue