(fm: &Map<String, Value>, key: &str)
| 270 | } |
| 271 | |
| 272 | fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> { |
| 273 | match fm.get(key) { |
| 274 | Some(Value::String(s)) if !s.is_empty() => Some(s.clone()), |
| 275 | Some(Value::Number(n)) => Some(n.to_string()), |
| 276 | _ => None, |
| 277 | } |
| 278 | } |
| 279 | |
| 280 | fn str_array(fm: &Map<String, Value>, key: &str) -> Vec<String> { |
| 281 | match fm.get(key) { |
no test coverage detected