mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
dc_get_locations: use from(Vec<dc_location>) instead of add_location
This commit is contained in:
@@ -250,12 +250,12 @@ pub fn dc_get_locations(
|
|||||||
Ok(loc)
|
Ok(loc)
|
||||||
},
|
},
|
||||||
|locations| {
|
|locations| {
|
||||||
let mut ret = dc_array_t::new_locations(500);
|
let mut ret = Vec::new();
|
||||||
|
|
||||||
for location in locations {
|
for location in locations {
|
||||||
ret.add_location(location?);
|
ret.push(location?);
|
||||||
}
|
}
|
||||||
Ok(ret.into_raw())
|
Ok(dc_array_t::from(ret).into_raw())
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.unwrap_or_else(|_| std::ptr::null_mut())
|
.unwrap_or_else(|_| std::ptr::null_mut())
|
||||||
|
|||||||
Reference in New Issue
Block a user