aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-05-17 13:10:53 +0200
committerAlex Auvolat <alex@adnab.me>2022-05-17 13:10:53 +0200
commit86a3fe8ec56d0ea180b48970fb626d10000dba8d (patch)
tree7d573286e00f4a506312ce83ce94a0f95a9d7d6c /src/api
parentec50ffac42f90496495b054fad568a8553cffb64 (diff)
parentc692f55d5ce2c3ed08db7fbc4844debcc0aeb134 (diff)
downloadgarage-86a3fe8ec56d0ea180b48970fb626d10000dba8d.tar.gz
garage-86a3fe8ec56d0ea180b48970fb626d10000dba8d.zip
Merge branch 'main' into admin-api
Diffstat (limited to 'src/api')
-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));
}
}