Skip to content

Commit

Permalink
Simplify match clauses in PartialEq
Browse files Browse the repository at this point in the history
  • Loading branch information
powergee committed Sep 30, 2024
1 parent b5f8698 commit 7e99db9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/strong.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,8 +667,8 @@ impl<T: RcObject + PartialEq> PartialEq for Rc<T> {
fn eq(&self, other: &Self) -> bool {
match (self.as_ref(), other.as_ref()) {
(None, None) => true,
(None, Some(_)) | (Some(_), None) => false,
(Some(x), Some(y)) => x.eq(y),
(_, _) => false,
}
}
}
Expand Down Expand Up @@ -897,8 +897,8 @@ impl<'g, T: RcObject + PartialEq> PartialEq for Snapshot<'g, T> {
fn eq(&self, other: &Self) -> bool {
match (self.as_ref(), other.as_ref()) {
(None, None) => true,
(None, Some(_)) | (Some(_), None) => false,
(Some(x), Some(y)) => x.eq(y),
(_, _) => false,
}
}
}
Expand Down

0 comments on commit 7e99db9

Please sign in to comment.