From e25cc140b8151d6546ae0b9c63b6fc0bb8a5e010 Mon Sep 17 00:00:00 2001 From: Kyle Simpson Date: Wed, 29 Sep 2021 09:51:39 +0100 Subject: [PATCH] Events: fix handling of multiple timed events on a single track (#96) Fixes an issue where the `EventData` were not stored in reverse order, meaning that only the last added TimedEvent would be serviced. This reverses the `Ord` for `EventData`, which should only be internally compared, allowing all timed events to be processed correctly in order. Fixes #95. --- src/events/data.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/data.rs b/src/events/data.rs index c0f3a1de9..b24f4aa30 100644 --- a/src/events/data.rs +++ b/src/events/data.rs @@ -66,7 +66,7 @@ impl Ord for EventData { .as_ref() .expect("T2 known to be well-defined by above."); - t1.cmp(t2) + t2.cmp(t1) } else { Ordering::Equal }