From c4c08f2552cb51641ae628a8282bfc91aa3a23f7 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Sat, 7 Sep 2019 03:06:13 +0000 Subject: [PATCH] Remove ok_to_continue pattern from msg_prepare_raw() This commit will fail CI due incorrect formatting. It is done deliberately to simplify review process. --- src/chat.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index 874af1b20..5cf47e80d 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -246,7 +246,6 @@ impl<'a> Chat<'a> { ) -> Result { let mut do_guarantee_e2ee: libc::c_int; let e2ee_enabled: libc::c_int; - let mut OK_TO_CONTINUE = true; let mut new_references = "".into(); let mut new_in_reply_to = "".into(); let mut msg_id = 0; @@ -295,7 +294,7 @@ impl<'a> Chat<'a> { context, 0, "Cannot send message, contact for chat #{} not found.", self.id, ); - OK_TO_CONTINUE = false; + return Ok(0); } } else { if self.typ == Chattype::Group || self.typ == Chattype::VerifiedGroup { @@ -305,7 +304,7 @@ impl<'a> Chat<'a> { } } } - if OK_TO_CONTINUE { + { /* check if we can guarantee E2EE for this message. if we guarantee E2EE, and circumstances change so that E2EE is no longer available at a later point (reset, changed settings),