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