diff options
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/k2v/range.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/api/k2v/range.rs b/src/api/k2v/range.rs index 1f7dc4cd..bb9d3be5 100644 --- a/src/api/k2v/range.rs +++ b/src/api/k2v/range.rs @@ -74,7 +74,11 @@ where } } if let Some(e) = end { - if entry.sort_key() == e { + let is_finished = match enumeration_order { + EnumerationOrder::Forward => entry.sort_key() >= e, + EnumerationOrder::Reverse => entry.sort_key() <= e, + }; + if is_finished { return Ok((entries, false, None)); } } |