mirror of
https://github.com/chatmail/core.git
synced 2026-05-16 21:36:30 +03:00
Simplify dc_array_search_id
This commit is contained in:
@@ -233,8 +233,8 @@ pub unsafe fn dc_array_search_id(
|
|||||||
if array.is_null() {
|
if array.is_null() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for i in 0..(*array).array.len() {
|
for (i, &u) in (*array).array.iter().enumerate() {
|
||||||
if (*array).array[i] == needle as size_t {
|
if u == needle as size_t {
|
||||||
if !ret_index.is_null() {
|
if !ret_index.is_null() {
|
||||||
*ret_index = i
|
*ret_index = i
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user