From 7e99db905aec7f5ca0f452d225f8977fb9711b58 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Kim Date: Mon, 30 Sep 2024 16:40:56 +0900 Subject: [PATCH] Simplify `match` clauses in `PartialEq` --- src/strong.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strong.rs b/src/strong.rs index 5d430dd..8609c72 100644 --- a/src/strong.rs +++ b/src/strong.rs @@ -667,8 +667,8 @@ impl PartialEq for Rc { 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, } } } @@ -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, } } }