mirror of
https://github.com/chatmail/core.git
synced 2026-05-16 21:36:30 +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_type2,
|
||||||
msg_type3,
|
msg_type3,
|
||||||
);
|
);
|
||||||
for i in 0..list.len() {
|
for (i, msg_id) in list.iter().enumerate() {
|
||||||
if curr_msg_id == list[i] {
|
if curr_msg_id == *msg_id {
|
||||||
match direction {
|
match direction {
|
||||||
Direction::Forward => {
|
Direction::Forward => {
|
||||||
if i + 1 < list.len() {
|
if i + 1 < list.len() {
|
||||||
|
|||||||
Reference in New Issue
Block a user