diff --git a/src/issue.rs b/src/issue.rs index d3ecf3d..61f7072 100644 --- a/src/issue.rs +++ b/src/issue.rs @@ -1,3 +1,4 @@ +use core::fmt; use std::io::Write; use std::str::FromStr; @@ -62,6 +63,21 @@ impl FromStr for State { } } +impl fmt::Display for State { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let fmt_str = match self { + State::New => "new", + State::Backlog => "backlog", + State::Blocked => "blocked", + State::InProgress => "inprogress", + State::Done => "done", + State::WontDo => "wontdo", + + }; + write!(f, "{fmt_str}") + } +} + impl Issue { pub fn new_from_dir(dir: &std::path::Path) -> Result { let mut description: Option = None;