mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
Fix one clippy::unneeded_unwrap warning
This commit is contained in:
@@ -819,19 +819,21 @@ pub fn dc_msg_get_summarytext_by_raw(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let ret = if append_text && text.is_some() {
|
|
||||||
let text = text.unwrap();
|
if !append_text {
|
||||||
if !prefix.is_empty() {
|
return prefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
if let Some(text) = text {
|
||||||
|
if prefix.is_empty() {
|
||||||
|
dc_truncate(text.as_ref(), approx_characters, true).to_string()
|
||||||
|
} else {
|
||||||
let tmp = format!("{} – {}", prefix, text.as_ref());
|
let tmp = format!("{} – {}", prefix, text.as_ref());
|
||||||
dc_truncate(&tmp, approx_characters, true).to_string()
|
dc_truncate(&tmp, approx_characters, true).to_string()
|
||||||
} else {
|
|
||||||
dc_truncate(text.as_ref(), approx_characters, true).to_string()
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
prefix
|
prefix
|
||||||
};
|
}
|
||||||
|
|
||||||
ret
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub unsafe fn dc_msg_has_deviating_timestamp(msg: &Message) -> libc::c_int {
|
pub unsafe fn dc_msg_has_deviating_timestamp(msg: &Message) -> libc::c_int {
|
||||||
|
|||||||
Reference in New Issue
Block a user