From 4604435579e8e489b54c45399939e081b14a40b6 Mon Sep 17 00:00:00 2001 From: Oliver Rockstedt Date: Wed, 15 Jan 2025 00:32:59 +0100 Subject: [PATCH] Derive Debug, Clone, Eq, PartialEq for Payload and Raw --- CHANGELOG.md | 2 ++ src/message/raw.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57b400c..07f65d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ This release focuses on improving the internal message data types and their usag - Derive `Debug`, `Clone`, `Eq`, and `PartialEq` for `U4`. - Derive `Debug`, `Clone`, `Eq`, and `PartialEq` for `InvalidU4`. - Derive `Debug`, `Clone`, `Eq`, and `PartialEq` for `InvalidU7`. +- Derive `Debug`, `Clone`, `Eq`, and `PartialEq` for `Payload`. +- Derive `Debug`, `Clone`, `Eq`, and `PartialEq` for `Raw`. - Re-exports of common data types in the `message` module. ### Changed diff --git a/src/message/raw.rs b/src/message/raw.rs index 5719c17..870ade1 100644 --- a/src/message/raw.rs +++ b/src/message/raw.rs @@ -3,6 +3,7 @@ use crate::message::data::u7::U7; /// Represents the payloads that the midi message may contain. +#[derive(Debug, Clone, Eq, PartialEq)] pub enum Payload { /// No payload. Empty, @@ -16,6 +17,7 @@ pub enum Payload { /// /// A midi message may be in, but without domain logic mainly useful for serializing. /// This represents the possible 'shapes', doesn't verify if the data makes sense though! +#[derive(Debug, Clone, Eq, PartialEq)] pub struct Raw { /// Status byte. pub status: u8,