summaryrefslogtreecommitdiff
path: root/src/event/app.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/app.rs')
-rw-r--r--src/event/app.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/event/app.rs b/src/event/app.rs
index 32f0a97..d664ec7 100644
--- a/src/event/app.rs
+++ b/src/event/app.rs
@@ -36,7 +36,7 @@ impl<'a> Events<'a> {
let channel_events = channels
.iter()
.map(channel::History::events)
- .kmerge_by(|a, b| a.instant.sequence < b.instant.sequence)
+ .kmerge_by(Sequence::merge)
.filter(Sequence::after(resume_at))
.map(Event::from);
@@ -44,14 +44,12 @@ impl<'a> Events<'a> {
let message_events = messages
.iter()
.map(message::History::events)
- .kmerge_by(|a, b| a.instant.sequence < b.instant.sequence)
+ .kmerge_by(Sequence::merge)
.filter(Sequence::after(resume_at))
.map(Event::from);
let replay_events = channel_events
- .merge_by(message_events, |a, b| {
- a.instant.sequence < b.instant.sequence
- })
+ .merge_by(message_events, Sequence::merge)
.collect::<Vec<_>>();
let resume_live_at = replay_events.last().map(Sequenced::sequence);