(id: &str)
| 66 | type Err = std::io::Error; |
| 67 | |
| 68 | fn from_str(id: &str) -> Result<Self, Self::Err> { |
| 69 | match id.is_empty() { |
| 70 | false => Ok(QuestionId(id.to_string())), |
| 71 | true => Err(Error::new(ErrorKind::InvalidInput, "No id provided")), |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | |
| 76 |