From c84486c4118450ffae329acfaa8213653b9f84c3 Mon Sep 17 00:00:00 2001 From: Nikita Sivukhin Date: Tue, 30 Sep 2025 18:45:00 +0400 Subject: [PATCH] clippy logged in as jussi - so I need to fix more stuff --- core/translate/main_loop.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/translate/main_loop.rs b/core/translate/main_loop.rs index 5e422442b..ca384b04f 100644 --- a/core/translate/main_loop.rs +++ b/core/translate/main_loop.rs @@ -1155,7 +1155,7 @@ fn emit_seek( // (this is safe as table BTree keys are always non-null single integer) match seek_def.iter_dir { IterationDirection::Forwards => { - if seek_index.is_some() && seek_index.unwrap().columns[0].order == SortOrder::Asc { + if seek_index.is_some_and(|index| index.columns[0].order == SortOrder::Asc) { program.emit_null(start_reg, None); program.emit_insn(Insn::SeekGT { is_index, @@ -1172,7 +1172,7 @@ fn emit_seek( } } IterationDirection::Backwards => { - if seek_index.is_some() && seek_index.unwrap().columns[0].order == SortOrder::Desc { + if seek_index.is_some_and(|index| index.columns[0].order == SortOrder::Desc) { program.emit_null(start_reg, None); program.emit_insn(Insn::SeekLT { is_index, @@ -1292,7 +1292,7 @@ fn emit_seek_termination( // then, we must explicitly stop before them as seek always has some bound condition over indexed column (e.g. c < ?, c >= ?, ...) match seek_def.iter_dir { IterationDirection::Forwards => { - if seek_index.is_some() && seek_index.unwrap().columns[0].order == SortOrder::Desc { + if seek_index.is_some_and(|index| index.columns[0].order == SortOrder::Desc) { program.emit_null(start_reg, None); program.emit_insn(Insn::IdxGE { cursor_id: seek_cursor_id, @@ -1303,7 +1303,7 @@ fn emit_seek_termination( } } IterationDirection::Backwards => { - if seek_index.is_some() && seek_index.unwrap().columns[0].order == SortOrder::Asc { + if seek_index.is_some_and(|index| index.columns[0].order == SortOrder::Asc) { program.emit_null(start_reg, None); program.emit_insn(Insn::IdxLE { cursor_id: seek_cursor_id,