Use take_while rather than filter for scanning last_receipt_count.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -97,8 +97,9 @@ impl Data {
|
|||||||
self.readreceiptid_readreceipt
|
self.readreceiptid_readreceipt
|
||||||
.rev_keys_prefix(&key)
|
.rev_keys_prefix(&key)
|
||||||
.ignore_err()
|
.ignore_err()
|
||||||
.ready_take_while(|(_, c, _): &Key<'_>| since.is_none_or(|since| since.gt(c)))
|
.ready_take_while(|(_, c, u): &Key<'_>| {
|
||||||
.ready_filter(|(_, _, u): &Key<'_>| user_id.as_ref().is_none_or(is_equal_to!(u)))
|
since.is_none_or(|since| since.gt(c)) && user_id.is_none_or(is_equal_to!(*u))
|
||||||
|
})
|
||||||
.map(|(_, c, _): Key<'_>| c)
|
.map(|(_, c, _): Key<'_>| c)
|
||||||
.boxed()
|
.boxed()
|
||||||
.next()
|
.next()
|
||||||
|
|||||||
Reference in New Issue
Block a user