mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 10:56:29 +03:00
refactor: rename dc_array_t::as_ptr() into dc_array_t::into_raw()
By convention as_* functions do not consume self by taking the reference.
This commit is contained in:
committed by
Friedel Ziegelmayer
parent
c34e66adb6
commit
0cffbaf1e9
@@ -1168,7 +1168,7 @@ pub fn dc_get_chat_msgs(
|
||||
};
|
||||
|
||||
if success.is_ok() {
|
||||
ret.as_ptr()
|
||||
ret.into_raw()
|
||||
} else {
|
||||
0 as *mut dc_array_t
|
||||
}
|
||||
@@ -1285,7 +1285,7 @@ pub fn dc_get_chat_media(
|
||||
for id in ids {
|
||||
ret.add_id(id? as u32);
|
||||
}
|
||||
Ok(ret.as_ptr())
|
||||
Ok(ret.into_raw())
|
||||
}
|
||||
).unwrap_or_else(|_| std::ptr::null_mut())
|
||||
}
|
||||
@@ -1460,7 +1460,7 @@ pub fn dc_get_chat_contacts(context: &Context, chat_id: u32) -> *mut dc_array_t
|
||||
ret.add_id(id? as u32);
|
||||
}
|
||||
|
||||
Ok(ret.as_ptr())
|
||||
Ok(ret.into_raw())
|
||||
},
|
||||
)
|
||||
.unwrap_or_else(|_| std::ptr::null_mut())
|
||||
|
||||
Reference in New Issue
Block a user