mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
get_next_media: enumerate() instead of indexing
This commit is contained in:
committed by
Alexander Krotov
parent
24aa3c781b
commit
92f1e6da1e
@@ -1738,8 +1738,8 @@ pub fn get_next_media(
|
||||
msg_type2,
|
||||
msg_type3,
|
||||
);
|
||||
for i in 0..list.len() {
|
||||
if curr_msg_id == list[i] {
|
||||
for (i, msg_id) in list.iter().enumerate() {
|
||||
if curr_msg_id == *msg_id {
|
||||
match direction {
|
||||
Direction::Forward => {
|
||||
if i + 1 < list.len() {
|
||||
|
||||
Reference in New Issue
Block a user