mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Merge pull request #152 from teloxide/improve_debug_assert
Improve `debug_assert!` message in `ChatId::unmark`
This commit is contained in:
commit
08e2befd2f
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue