add an 'info' subcommand

This commit is contained in:
Dustin J. Mitchell 2020-11-24 11:31:56 -05:00
parent 888b38fd79
commit 8233763295
4 changed files with 112 additions and 1 deletions

View file

@ -68,6 +68,16 @@ impl Status {
Status::Deleted => "D",
}
}
/// Get the full-name value for this status to use in the TaskMap.
pub fn to_string(&self) -> &str {
// TODO: should be impl Display
match self {
Status::Pending => "Pending",
Status::Completed => "Completed",
Status::Deleted => "Deleted",
}
}
}
#[derive(Debug, PartialEq)]