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 {
|
||||
#[default]
|
||||
#[serde(rename = "tcp")]
|
||||
Tcp,
|
||||
#[serde(rename = "tls")]
|
||||
|
@ -50,12 +51,6 @@ pub enum TransportType {
|
|||
Noise,
|
||||
}
|
||||
|
||||
impl Default for TransportType {
|
||||
fn default() -> TransportType {
|
||||
TransportType::Tcp
|
||||
}
|
||||
}
|
||||
|
||||
/// Per service config
|
||||
/// All Option are optional in configuration but must be Some value in runtime
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Default)]
|
||||
|
@ -81,18 +76,16 @@ impl ClientServiceConfig {
|
|||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
|
||||
#[derive(Default)]
|
||||
pub enum ServiceType {
|
||||
#[serde(rename = "tcp")]
|
||||
#[default]
|
||||
Tcp,
|
||||
#[serde(rename = "udp")]
|
||||
Udp,
|
||||
}
|
||||
|
||||
impl Default for ServiceType {
|
||||
fn default() -> Self {
|
||||
ServiceType::Tcp
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fn default_service_type() -> ServiceType {
|
||||
Default::default()
|
||||
|
|
Loading…
Reference in New Issue