(value: Option<&Value>)
| 1115 | Value::String(name.to_string()) |
| 1116 | } |
| 1117 | fn string(value: Option<&Value>) -> Result<Option<String>, ()> { |
| 1118 | match value { |
| 1119 | None | Some(Value::Null) => Ok(None), |
| 1120 | Some(Value::String(value)) if value.trim().is_empty() => Ok(None), |
| 1121 | Some(Value::String(value)) if !value.chars().any(char::is_control) => { |
| 1122 | Ok(Some(value.trim().to_string())) |
| 1123 | } |
| 1124 | _ => Err(()), |
| 1125 | } |
| 1126 | } |
| 1127 | let incomplete = || SkillMetadata { |
| 1128 | version: None, |
| 1129 | updated_at: None, |
no test coverage detected