mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 22:46:29 +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() {
|
||||
return false;
|
||||
}
|
||||
for i in 0..(*array).array.len() {
|
||||
if (*array).array[i] == needle as size_t {
|
||||
for (i, &u) in (*array).array.iter().enumerate() {
|
||||
if u == needle as size_t {
|
||||
if !ret_index.is_null() {
|
||||
*ret_index = i
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user