Skip to content

Commit

Permalink
Merge branch 'main' into pmt
Browse files Browse the repository at this point in the history
  • Loading branch information
oluceps committed May 6, 2023
2 parents 18262a2 + a181590 commit 567e70e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 5 additions & 12 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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)]
Expand All @@ -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()
Expand Down

0 comments on commit 567e70e

Please sign in to comment.