Turn ChatId-related functions into methods

This commit is contained in:
Alexander Krotov
2020-01-25 17:50:57 +03:00
parent a7477516d1
commit a2845f44ab
8 changed files with 271 additions and 270 deletions

View File

@@ -547,8 +547,8 @@ mod tests {
let chats = Chatlist::try_load(&t.ctx, 0, None, None).unwrap();
assert_eq!(chats.len(), 2);
chat::delete(&t.ctx, chats.get_chat_id(0)).ok();
chat::delete(&t.ctx, chats.get_chat_id(1)).ok();
chats.get_chat_id(0).delete(&t.ctx).ok();
chats.get_chat_id(1).delete(&t.ctx).ok();
let chats = Chatlist::try_load(&t.ctx, 0, None, None).unwrap();
assert_eq!(chats.len(), 0);