Improve debug_assert! message in ChatId::unmark

This commit is contained in:
Maybe Waffle 2021-12-25 04:34:05 +03:00
parent a07c9b0431
commit 34647c7a38

View file

@ -32,7 +32,7 @@ impl ChatId {
&Self::Id(id @ MIN_CHAT_ID..=-1) => Chat(-id as _),
&Self::Id(id @ MIN_CHANNEL_ID..=MAX_CHANNEL_ID) => Channel((MAX_CHANNEL_ID - id) as _),
&Self::Id(id) => {
debug_assert!(0 < id && id < MAX_USER_ID, "malformed chat id");
debug_assert!(0 < id && id < MAX_USER_ID, "malformed chat id: {}", id);
User(id as _)
}
Self::ChannelUsername(_) => return None,