diff --git a/crates/federate/src/send.rs b/crates/federate/src/send.rs index 09fac10cc..2b5f47c29 100644 --- a/crates/federate/src/send.rs +++ b/crates/federate/src/send.rs @@ -30,7 +30,7 @@ impl PartialEq for SendSuccessInfo { /// top impl PartialOrd for SendSuccessInfo { fn partial_cmp(&self, other: &Self) -> Option { - other.activity_id.partial_cmp(&self.activity_id) + Some(self.cmp(other)) } } impl Ord for SendSuccessInfo { diff --git a/crates/federate/src/worker.rs b/crates/federate/src/worker.rs index c63c87f62..bfebeac8e 100644 --- a/crates/federate/src/worker.rs +++ b/crates/federate/src/worker.rs @@ -275,7 +275,9 @@ impl InstanceWorker { .map(|a| a.activity_id == ActivityId(last_id.0 + 1)) .unwrap_or(false) { - let next = successfuls.pop().unwrap(); + let next = successfuls + .pop() + .context("peek above ensures pop has value")?; last_id = next.activity_id; self.state.last_successful_id = Some(next.activity_id); self.state.last_successful_published_time = next.published;