mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
Change type of function from `const char *' to &str
This commit is contained in:
@@ -1284,7 +1284,7 @@ unsafe fn dc_mimeparser_add_single_part_if_known(
|
|||||||
mimeparser,
|
mimeparser,
|
||||||
msg_type,
|
msg_type,
|
||||||
mime_type,
|
mime_type,
|
||||||
raw_mime,
|
as_str(raw_mime),
|
||||||
decoded_data,
|
decoded_data,
|
||||||
decoded_data_bytes,
|
decoded_data_bytes,
|
||||||
desired_filename,
|
desired_filename,
|
||||||
@@ -1312,7 +1312,7 @@ unsafe fn do_add_single_file_part(
|
|||||||
parser: &mut dc_mimeparser_t,
|
parser: &mut dc_mimeparser_t,
|
||||||
msg_type: Viewtype,
|
msg_type: Viewtype,
|
||||||
mime_type: libc::c_int,
|
mime_type: libc::c_int,
|
||||||
raw_mime: *const libc::c_char,
|
raw_mime: &str,
|
||||||
decoded_data: *const libc::c_char,
|
decoded_data: *const libc::c_char,
|
||||||
decoded_data_bytes: size_t,
|
decoded_data_bytes: size_t,
|
||||||
desired_filename: *const libc::c_char,
|
desired_filename: *const libc::c_char,
|
||||||
@@ -1338,7 +1338,7 @@ unsafe fn do_add_single_file_part(
|
|||||||
part.int_mimetype = mime_type;
|
part.int_mimetype = mime_type;
|
||||||
part.bytes = decoded_data_bytes as libc::c_int;
|
part.bytes = decoded_data_bytes as libc::c_int;
|
||||||
part.param.set(Param::File, as_str(pathNfilename));
|
part.param.set(Param::File, as_str(pathNfilename));
|
||||||
part.param.set(Param::MimeType, as_str(raw_mime));
|
part.param.set(Param::MimeType, raw_mime);
|
||||||
if mime_type == 80 {
|
if mime_type == 80 {
|
||||||
assert!(!decoded_data.is_null(), "invalid image data");
|
assert!(!decoded_data.is_null(), "invalid image data");
|
||||||
let data = std::slice::from_raw_parts(
|
let data = std::slice::from_raw_parts(
|
||||||
|
|||||||
Reference in New Issue
Block a user