665DHE5ZTUMMK3N54FLFLJZJL3HTWSXZMAHKTQGOZEVSUKNMMQRQC
}
if matches!(key.code, KeyCode::Char('n') | KeyCode::Right)
&& matches!(key.kind, KeyEventKind::Press | KeyEventKind::Repeat)
{
let mut mistakes = app
.results
.iter()
.enumerate()
.cycle()
.skip(app.item)
.filter(|(idx, (_, p, l))| *idx != app.item && *p != *l as i32);
if let Some((idx, _)) = mistakes.next() {
app.item = idx;
}
if matches!(key.code, KeyCode::Char('p') | KeyCode::Left)
&& matches!(key.kind, KeyEventKind::Press | KeyEventKind::Repeat)
{
let mut mistakes = app
.results
.iter()
.enumerate()
.rev()
.cycle()
.skip(app.results.len() - app.item)
.filter(|(idx, (_, p, l))| *idx != app.item && *p != *l as i32);
if let Some((idx, _)) = mistakes.next() {
app.item = idx;
}
}