feat: implements Display for Status
This commit is contained in:
parent
eefb4c283c
commit
462c1168c3
@ -1,7 +1,5 @@
|
||||
use std::collections::HashMap;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
||||
use std::{collections::HashMap, fmt::Display};
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum Action {
|
||||
@ -17,7 +15,6 @@ pub enum Action {
|
||||
Exit,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub enum Status {
|
||||
Open,
|
||||
@ -26,6 +23,17 @@ pub enum Status {
|
||||
Closed,
|
||||
}
|
||||
|
||||
impl Display for Status {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::Open => write!(f, "OPEN"),
|
||||
Self::InProgress => write!(f, "IN PROGRESS"),
|
||||
Self::Resolved => write!(f, "RESOLVED"),
|
||||
Self::Closed => write!(f, "Closed"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct Epic {
|
||||
pub name: String,
|
||||
@ -40,7 +48,7 @@ impl Epic {
|
||||
name,
|
||||
description,
|
||||
status: Status::Open,
|
||||
stories: vec![]
|
||||
stories: vec![],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user