mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 22:16:30 +03:00
Remove dc_array_get_raw
It does not work with typed arrays, such as locations and messages. Use dc_array_get_id in a loop instead.
This commit is contained in:
committed by
link2xt
parent
09833eb74d
commit
42f6a7c77c
@@ -38,14 +38,6 @@ impl dc_array_t {
|
||||
pub(crate) fn search_id(&self, needle: u32) -> Option<usize> {
|
||||
(0..self.len()).find(|i| self.get_id(*i) == needle)
|
||||
}
|
||||
|
||||
pub(crate) fn as_ptr(&self) -> *const u32 {
|
||||
if let dc_array_t::Uint(v) = self {
|
||||
v.as_ptr()
|
||||
} else {
|
||||
panic!("Attempt to convert array of something other than uints to raw");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Vec<u32>> for dc_array_t {
|
||||
|
||||
Reference in New Issue
Block a user