From 58af97744177c2ad9d597eae91cc7233d29ab260 Mon Sep 17 00:00:00 2001 From: "Guillaume W. Bres" Date: Thu, 25 Jul 2024 13:53:37 +0200 Subject: [PATCH] CommonViewClass: impl Display Signed-off-by: Guillaume W. Bres --- cggtts/src/track/class.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cggtts/src/track/class.rs b/cggtts/src/track/class.rs index 8b83bb8..4dc89d0 100644 --- a/cggtts/src/track/class.rs +++ b/cggtts/src/track/class.rs @@ -15,6 +15,15 @@ pub enum CommonViewClass { MultiChannel, } +impl std::fmt::Display for CommonViewClass { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::SingleChannel => write!(f, "Single Channel"), + Self::MultiChannel => write!(f, "Multi Channel"), + } + } +} + impl std::fmt::UpperHex for CommonViewClass { fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result { match self {