Minor fixes to status in tc-lib

This commit is contained in:
Dustin J. Mitchell
2022-12-15 02:52:40 +00:00
committed by Dustin J. Mitchell
parent 64aa1b1c7e
commit 7c27f116ad
2 changed files with 2 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ impl From<TCStatus> for Status {
TCStatus::Completed => Status::Completed,
TCStatus::Deleted => Status::Deleted,
TCStatus::Recurring => Status::Recurring,
TCStatus::Unknown => Status::Unknown("unknown".to_string()),
_ => Status::Unknown(format!("unknown TCStatus {}", status as u32)),
}
}
}

View File

@@ -14,8 +14,7 @@ pub enum Status {
}
impl Status {
/// Get a Status from the 1-character value in a TaskMap,
/// defaulting to Pending
/// Get a Status from the string value in a TaskMap
pub(crate) fn from_taskmap(s: &str) -> Status {
match s {
"pending" => Status::Pending,