mirror of
https://github.com/chatmail/core.git
synced 2026-05-24 17:26:30 +03:00
cargo fmt
This commit is contained in:
committed by
holger krekel
parent
2f204fd2aa
commit
c7ebf6de09
@@ -1178,14 +1178,10 @@ unsafe fn dc_mimeparser_add_single_part_if_known(
|
||||
let charset: *const libc::c_char =
|
||||
mailmime_content_charset_get((*mime).mm_content_type);
|
||||
if !charset.is_null()
|
||||
&& strcmp(
|
||||
charset,
|
||||
b"utf-8\x00" as *const u8 as *const libc::c_char,
|
||||
) != 0i32
|
||||
&& strcmp(
|
||||
charset,
|
||||
b"UTF-8\x00" as *const u8 as *const libc::c_char,
|
||||
) != 0i32
|
||||
&& strcmp(charset, b"utf-8\x00" as *const u8 as *const libc::c_char)
|
||||
!= 0i32
|
||||
&& strcmp(charset, b"UTF-8\x00" as *const u8 as *const libc::c_char)
|
||||
!= 0i32
|
||||
{
|
||||
if let Some(encoding) = Charset::for_label(
|
||||
CStr::from_ptr(charset).to_str().unwrap().as_bytes(),
|
||||
@@ -1221,11 +1217,9 @@ unsafe fn dc_mimeparser_add_single_part_if_known(
|
||||
8795901732489102124 => {}
|
||||
_ => {
|
||||
/* check header directly as is_send_by_messenger is not yet set up */
|
||||
let is_msgrmsg: libc::c_int =
|
||||
(dc_mimeparser_lookup_optional_field(
|
||||
let is_msgrmsg: libc::c_int = (dc_mimeparser_lookup_optional_field(
|
||||
&mimeparser,
|
||||
b"Chat-Version\x00" as *const u8
|
||||
as *const libc::c_char,
|
||||
b"Chat-Version\x00" as *const u8 as *const libc::c_char,
|
||||
) != 0 as *mut libc::c_void
|
||||
as *mut mailimf_optional_field)
|
||||
as libc::c_int;
|
||||
@@ -1243,10 +1237,8 @@ unsafe fn dc_mimeparser_add_single_part_if_known(
|
||||
(*part).type_0 = 10i32;
|
||||
(*part).int_mimetype = mime_type;
|
||||
(*part).msg = simplified_txt;
|
||||
(*part).msg_raw = strndup(
|
||||
decoded_data,
|
||||
decoded_data_bytes as libc::c_ulong,
|
||||
);
|
||||
(*part).msg_raw =
|
||||
strndup(decoded_data, decoded_data_bytes as libc::c_ulong);
|
||||
do_add_single_part(mimeparser, part);
|
||||
part = 0 as *mut dc_mimepart_t
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user