Skip to content

Commit f6fe428

Browse files
authored
CommonViewClass: impl Display (#12)
Signed-off-by: Guillaume W. Bres <[email protected]>
1 parent d87ce60 commit f6fe428

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cggtts/src/track/class.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ pub enum CommonViewClass {
1515
MultiChannel,
1616
}
1717

18+
impl std::fmt::Display for CommonViewClass {
19+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
20+
match self {
21+
Self::SingleChannel => write!(f, "Single Channel"),
22+
Self::MultiChannel => write!(f, "Multi Channel"),
23+
}
24+
}
25+
}
26+
1827
impl std::fmt::UpperHex for CommonViewClass {
1928
fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
2029
match self {

0 commit comments

Comments
 (0)