From b83e6f6e7c742965a895d636462fb1f5b1c02995 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Sun, 26 Jan 2020 15:37:54 +0300 Subject: [PATCH] Simplify MsgId.is_special() --- src/message.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/message.rs b/src/message.rs index 8915dda1b..9e37a962d 100644 --- a/src/message.rs +++ b/src/message.rs @@ -47,10 +47,7 @@ impl MsgId { /// /// This kind of message ID can not be used for real messages. pub fn is_special(self) -> bool { - match self.0 { - 0..=DC_MSG_ID_LAST_SPECIAL => true, - _ => false, - } + self.0 <= DC_MSG_ID_LAST_SPECIAL } /// Whether the message ID is unset.