aboutsummaryrefslogtreecommitdiff
path: root/src/api/k2v/range.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/k2v/range.rs')
-rw-r--r--src/api/k2v/range.rs6
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));
}
}