Implement From<Vec<dc_location>> for dc_array_t

This commit is contained in:
Alexander Krotov
2019-07-28 15:27:50 +03:00
parent 9314a5a8fd
commit 2688a397aa

View File

@@ -138,6 +138,12 @@ impl dc_array_t {
}
}
impl From<Vec<dc_location>> for dc_array_t {
fn from(array: Vec<dc_location>) -> Self {
dc_array_t::Locations(array)
}
}
pub unsafe fn dc_array_unref(array: *mut dc_array_t) {
if array.is_null() {
return;