(fm: &Map<String, Value>, key: &str)
| 326 | } |
| 327 | |
| 328 | fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> { |
| 329 | match fm.get(key) { |
| 330 | Some(Value::String(s)) if !s.is_empty() => Some(s.clone()), |
| 331 | Some(Value::Number(n)) => Some(n.to_string()), |
| 332 | _ => None, |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | fn str_array(fm: &Map<String, Value>, key: &str) -> Vec<String> { |
| 337 | match fm.get(key) { |
no test coverage detected