Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
qzed committed Apr 19, 2023
1 parent f0260fe commit ecbb423
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
9 changes: 2 additions & 7 deletions surface-dtx-daemon/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ pub struct Log {
pub level: LogLevel,
}

#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Default)]
#[serde(rename_all="lowercase")]
pub enum LogLevel {
Error,
Warn,
#[default]
Info,
Debug,
Trace,
Expand Down Expand Up @@ -146,12 +147,6 @@ impl Diagnostics {
}


impl Default for LogLevel {
fn default() -> LogLevel {
LogLevel::Info
}
}

mod defaults {
pub fn delay_attach() -> f32 {
5.0
Expand Down
9 changes: 2 additions & 7 deletions surface-dtx-userd/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ pub struct Log {
pub level: LogLevel,
}

#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Default)]
#[serde(rename_all="lowercase")]
pub enum LogLevel {
Error,
Warn,
#[default]
Info,
Debug,
Trace,
Expand Down Expand Up @@ -110,12 +111,6 @@ impl Diagnostics {
}


impl Default for LogLevel {
fn default() -> LogLevel {
LogLevel::Info
}
}

impl From<LogLevel> for tracing::Level {
fn from(level: LogLevel) -> Self {
match level {
Expand Down

0 comments on commit ecbb423

Please sign in to comment.