Pass slice to dc_receive_imf

instead of pointer and length
This commit is contained in:
Alexander Krotov
2019-09-27 17:53:35 +03:00
parent 6c9c21c135
commit 3933353b5f
3 changed files with 7 additions and 30 deletions

View File

@@ -953,14 +953,7 @@ impl Imap {
if !is_deleted && msg.body().is_some() {
let body = msg.body().unwrap();
unsafe {
dc_receive_imf(
context,
body.as_ptr() as *const libc::c_char,
body.len(),
folder.as_ref(),
server_uid,
flags as u32,
);
dc_receive_imf(context, &body, folder.as_ref(), server_uid, flags as u32);
}
}
}