From 58369fe7d08b20f0cd898255dad16b79665a13e8 Mon Sep 17 00:00:00 2001 From: SaurusXI Date: Mon, 21 Jun 2021 20:14:40 +0530 Subject: [PATCH] matrix-sdk: (fix) use macro for matching in are_events_visible --- matrix_sdk/src/room/common.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/matrix_sdk/src/room/common.rs b/matrix_sdk/src/room/common.rs index dfc2cf08..f8709b66 100644 --- a/matrix_sdk/src/room/common.rs +++ b/matrix_sdk/src/room/common.rs @@ -184,10 +184,10 @@ impl Common { fn are_events_visible(&self) -> bool { if let RoomType::Invited = self.inner.room_type() { - return match self.inner.history_visibility() { - HistoryVisibility::WorldReadable | HistoryVisibility::Invited => true, - _ => false, - }; + return matches!( + self.inner.history_visibility(), + HistoryVisibility::WorldReadable | HistoryVisibility::Invited + ); } true