(status: &str)
| 252 | } |
| 253 | |
| 254 | pub fn parse_status(status: &str) -> TodoStatus { |
| 255 | match status.to_lowercase().as_str() { |
| 256 | "pending" => TodoStatus::Pending, |
| 257 | "in_progress" | "in progress" => TodoStatus::InProgress, |
| 258 | "completed" => TodoStatus::Completed, |
| 259 | "cancelled" => TodoStatus::Cancelled, |
| 260 | _ => TodoStatus::Pending, |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | pub fn parse_priority(priority: &str) -> TodoPriority { |
| 265 | match priority.to_lowercase().as_str() { |