Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
youyuanwu committed Oct 21, 2024
1 parent 862e75b commit af20a32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
10 changes: 1 addition & 9 deletions crates/libs/core/src/client/notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,7 @@ impl PartialOrd for ServiceEndpointsVersion {
/// a is newer and up to date.
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
match self.compare(other) {
Ok(i) => {
if i == 0 {
Some(std::cmp::Ordering::Equal)
} else if i > 0 {
Some(std::cmp::Ordering::Greater)
} else {
Some(std::cmp::Ordering::Less)
}
}
Ok(i) => Some(i.cmp(&0)),
// If you compare version of different service you get error
Err(_) => None,
}
Expand Down
10 changes: 1 addition & 9 deletions crates/libs/core/src/client/svc_mgmt_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,15 +420,7 @@ impl PartialOrd for ResolvedServicePartition {
/// a is newer and up to date.
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
match self.compare_version(other) {
Ok(i) => {
if i == 0 {
Some(std::cmp::Ordering::Equal)
} else if i > 0 {
Some(std::cmp::Ordering::Greater)
} else {
Some(std::cmp::Ordering::Less)
}
}
Ok(i) => Some(i.cmp(&0)),
// If you compare version of different service you get error
Err(_) => None,
}
Expand Down

0 comments on commit af20a32

Please sign in to comment.