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:
Alexander
2019-07-28 18:31:57 +00:00
committed by Friedel Ziegelmayer
parent c34e66adb6
commit 0cffbaf1e9
5 changed files with 12 additions and 12 deletions

View File

@@ -606,7 +606,7 @@ pub fn dc_get_contacts(
ret.add_id(1);
}
ret.as_ptr()
ret.into_raw()
}
pub fn dc_get_blocked_cnt(context: &Context) -> libc::c_int {
@@ -635,7 +635,7 @@ pub fn dc_get_blocked_contacts(context: &Context) -> *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())