cargo-fmt

This commit is contained in:
Dmitry Bogatov
2019-09-21 06:19:55 +00:00
parent 5b917e7d10
commit 43f6db3252

View File

@@ -871,13 +871,14 @@ fn maybe_delete_draft(context: &Context, chat_id: u32) -> bool {
///
/// Return true on success, false on database error.
fn do_set_draft(context: &Context, chat_id: u32, msg: &mut Message) -> bool {
match msg.type_0 {
Viewtype::Unknown => return false,
Viewtype::Text => if msg.text.as_ref().map_or(false, |s| s.is_empty()) {
Viewtype::Text => {
if msg.text.as_ref().map_or(false, |s| s.is_empty()) {
return false;
},
_ =>
}
}
_ => {
if let Some(path_filename) = msg.param.get(Param::File) {
let mut path_filename = path_filename.to_string();
if dc_msg_is_increation(msg) && !dc_is_blobdir_path(context, &path_filename) {
@@ -889,6 +890,7 @@ fn do_set_draft(context: &Context, chat_id: u32, msg: &mut Message) -> bool {
msg.param.set(Param::File, path_filename);
}
}
}
sql::execute(
context,