Display impl fro item
This commit is contained in:
parent
82589a4d4d
commit
48b4a10648
|
@ -1,3 +1,5 @@
|
|||
use std::fmt::Display;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, PartialOrd, Ord, Default)]
|
||||
|
@ -6,4 +8,14 @@ pub enum Item {
|
|||
Project,
|
||||
Unit,
|
||||
Agent,
|
||||
}
|
||||
|
||||
impl Display for Item {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Item::Project => write!(f, "Project"),
|
||||
Item::Unit => write!(f, "Unit"),
|
||||
Item::Agent => write!(f, "Agent"),
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue