Skip to content

Commit

Permalink
fix clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburniske committed Feb 20, 2024
1 parent fbbd6b7 commit 9b80948
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions devtools/src/dev_tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ enum SettingTime {
impl SettingTime {
fn max(&self, other: Self) -> Self {
match (self, other) {
(SettingTime::None, other) => other.clone(),
(SettingTime::None, other) => other,
(current, SettingTime::None) => *current,
(SettingTime::Some(current), SettingTime::Some(other)) if other > *current => {
SettingTime::Some(other)
Expand All @@ -152,14 +152,14 @@ impl SettingTime {

fn min(&self, other: Self) -> Self {
match (self, other) {
(SettingTime::None, other) => other.clone(),
(SettingTime::None, other) => other,
(current, SettingTime::None) => *current,
(SettingTime::Some(current), SettingTime::Some(other)) if other < *current => {
SettingTime::Some(other)
}
(SettingTime::Some(current), SettingTime::Some(_)) => SettingTime::Some(*current),
(SettingTime::Infinity, other) => other,
(current, SettingTime::Infinity) => current.clone(),
(current, SettingTime::Infinity) => *current,
}
}

Expand All @@ -170,11 +170,11 @@ impl SettingTime {
}
}

fn to_expiration(&self) -> Option<Duration> {
fn to_expiration(self) -> Option<Duration> {
match self {
SettingTime::None => None,
SettingTime::Infinity => None,
SettingTime::Some(duration) => Some(*duration),
SettingTime::Some(duration) => Some(duration),
}
}
}
Expand Down

0 comments on commit 9b80948

Please sign in to comment.