cargo-fmt

This commit is contained in:
Dmitry Bogatov
2019-09-07 03:09:01 +00:00
parent c4c08f2552
commit 7d9fc682a0

View File

@@ -271,7 +271,7 @@ impl<'a> Chat<'a> {
); );
return Ok(0); return Ok(0);
} }
{
if let Some(from) = context.sql.get_config(context, "configured_addr") { if let Some(from) = context.sql.get_config(context, "configured_addr") {
let new_rfc724_mid = { let new_rfc724_mid = {
let grpid = match self.typ { let grpid = match self.typ {
@@ -304,7 +304,7 @@ impl<'a> Chat<'a> {
} }
} }
} }
{
/* check if we can guarantee E2EE for this message. /* check if we can guarantee E2EE for this message.
if we guarantee E2EE, and circumstances change if we guarantee E2EE, and circumstances change
so that E2EE is no longer available at a later point (reset, changed settings), so that E2EE is no longer available at a later point (reset, changed settings),
@@ -386,15 +386,11 @@ impl<'a> Chat<'a> {
}; };
if !parent_references.is_empty() && !parent_rfc724_mid.is_empty() { if !parent_references.is_empty() && !parent_rfc724_mid.is_empty() {
new_references = new_references = format!("{} {}", parent_references, parent_rfc724_mid);
format!("{} {}", parent_references, parent_rfc724_mid);
} else if !parent_references.is_empty() { } else if !parent_references.is_empty() {
new_references = parent_references.to_string(); new_references = parent_references.to_string();
} else if !parent_in_reply_to.is_empty() } else if !parent_in_reply_to.is_empty() && !parent_rfc724_mid.is_empty() {
&& !parent_rfc724_mid.is_empty() new_references = format!("{} {}", parent_in_reply_to, parent_rfc724_mid);
{
new_references =
format!("{} {}", parent_in_reply_to, parent_rfc724_mid);
} else if !parent_in_reply_to.is_empty() { } else if !parent_in_reply_to.is_empty() {
new_references = parent_in_reply_to.clone(); new_references = parent_in_reply_to.clone();
} }
@@ -469,11 +465,9 @@ impl<'a> Chat<'a> {
self.id, self.id,
); );
} }
}
} else { } else {
error!(context, 0, "Cannot send message, not configured.",); error!(context, 0, "Cannot send message, not configured.",);
} }
}
Ok(msg_id) Ok(msg_id)
} }