mirror of
https://github.com/chatmail/core.git
synced 2026-05-09 01:46:30 +03:00
Fix one clippy::unneeded_unwrap warning
This commit is contained in:
@@ -1563,10 +1563,8 @@ pub unsafe fn remove_contact_from_chat(
|
||||
|
||||
/* we do not check if "contact_id" exists but just delete all records with the id from chats_contacts */
|
||||
/* this allows to delete pending references to deleted contacts. Of course, this should _not_ happen. */
|
||||
let chat = Chat::load_from_db(context, chat_id);
|
||||
|
||||
if !(!real_group_exists(context, chat_id) || chat.is_err()) {
|
||||
let chat = chat.unwrap();
|
||||
if let Ok(chat) = Chat::load_from_db(context, chat_id) {
|
||||
if real_group_exists(context, chat_id) {
|
||||
if !(is_contact_in_chat(context, chat_id, 1 as u32) == 1) {
|
||||
log_event!(
|
||||
context,
|
||||
@@ -1618,6 +1616,7 @@ pub unsafe fn remove_contact_from_chat(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !success {
|
||||
bail!("Failed to remove contact");
|
||||
|
||||
Reference in New Issue
Block a user