mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 01:46:34 +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 !prefix.is_empty() {
|
||||
|
||||
if !append_text {
|
||||
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());
|
||||
dc_truncate(&tmp, approx_characters, true).to_string()
|
||||
} else {
|
||||
dc_truncate(text.as_ref(), approx_characters, true).to_string()
|
||||
}
|
||||
} else {
|
||||
prefix
|
||||
};
|
||||
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
||||
pub unsafe fn dc_msg_has_deviating_timestamp(msg: &Message) -> libc::c_int {
|
||||
|
||||
Reference in New Issue
Block a user