mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 07:16:31 +03:00
Rename to_str() -> as_str() to match stdlib naming convention
The function does a cast and does not create a new objects. The stdlib convention is to use to_*() for functions which return new objects and as_*() for functions which keep referring to the same data but using a different type. Follow that convention.
This commit is contained in:
@@ -486,13 +486,13 @@ unsafe fn dc_job_do_DC_JOB_MOVE_MSG(context: &Context, job: &mut dc_job_t) {
|
||||
);
|
||||
|
||||
if !dest_folder.is_null() {
|
||||
let server_folder = to_str((*msg).server_folder);
|
||||
let server_folder = as_str((*msg).server_folder);
|
||||
|
||||
match inbox.mv(
|
||||
context,
|
||||
server_folder,
|
||||
(*msg).server_uid,
|
||||
to_str(dest_folder),
|
||||
as_str(dest_folder),
|
||||
&mut dest_uid,
|
||||
) as libc::c_uint
|
||||
{
|
||||
@@ -593,7 +593,7 @@ unsafe fn dc_job_do_DC_JOB_MARKSEEN_MDN_ON_IMAP(context: &Context, job: &mut dc_
|
||||
0 as *const libc::c_char,
|
||||
);
|
||||
if !dest_folder.is_null() {
|
||||
let dest_folder = to_str(dest_folder);
|
||||
let dest_folder = as_str(dest_folder);
|
||||
if 1 == inbox.mv(context, folder, uid, dest_folder, &mut dest_uid)
|
||||
as libc::c_uint
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user