From f3079347e726059b2794e7da1c018f73bdeebd55 Mon Sep 17 00:00:00 2001 From: Pere Diaz Bou Date: Mon, 4 Aug 2025 15:27:59 +0200 Subject: [PATCH] core/mvcc: op.eq_only --- core/mvcc/cursor.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/core/mvcc/cursor.rs b/core/mvcc/cursor.rs index 1f098e639..f10326df7 100644 --- a/core/mvcc/cursor.rs +++ b/core/mvcc/cursor.rs @@ -177,12 +177,8 @@ impl MvccLazyCursor { }; let rowid = self.db.seek_rowid(bound, lower_bound); if let Some(rowid) = rowid { - let eq_only = matches!( - op, - SeekOp::GE { eq_only: true } | SeekOp::LE { eq_only: true } - ); self.current_pos = CursorPosition::Loaded(rowid); - if eq_only { + if op.eq_only() { if rowid.row_id == row_id { Ok(IOResult::Done(SeekResult::Found)) } else { @@ -192,7 +188,7 @@ impl MvccLazyCursor { Ok(IOResult::Done(SeekResult::Found)) } } else { - let forwards = matches!(op, SeekOp::GE { eq_only: false } | SeekOp::GT); + let forwards = matches!(op, SeekOp::GE { eq_only: _ } | SeekOp::GT); if forwards { self.last(); } else {