Simplify MsgId.is_special()

This commit is contained in:
Alexander Krotov
2020-01-26 15:37:54 +03:00
committed by holger krekel
parent 2687777a82
commit b83e6f6e7c

View File

@@ -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.