From cdff275803dd465243e07883015780871f1f3860 Mon Sep 17 00:00:00 2001 From: phiresky Date: Thu, 30 May 2024 12:44:35 +0200 Subject: [PATCH] Update crates/federate/src/send.rs Co-authored-by: dullbananas --- crates/federate/src/send.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/federate/src/send.rs b/crates/federate/src/send.rs index 2c9fc9c64..46a612ef4 100644 --- a/crates/federate/src/send.rs +++ b/crates/federate/src/send.rs @@ -20,7 +20,12 @@ pub(crate) struct SendSuccessInfo { pub published: Option>, pub was_skipped: bool, } -// need to be able to order them for the binary heap in the worker +// order backwards by activity_id for the binary heap in the worker +impl PartialEq for SendSuccessInfo { + fn eq(&self, other: &Self) -> bool { + self.activity_id == other.activity_id + } +} impl PartialOrd for SendSuccessInfo { fn partial_cmp(&self, other: &Self) -> Option { other.activity_id.partial_cmp(&self.activity_id)