(fm: &Map<String, Value>, key: &str)
| 404 | } |
| 405 | |
| 406 | fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> { |
| 407 | match fm.get(key) { |
| 408 | Some(Value::String(s)) if !s.is_empty() => Some(s.clone()), |
| 409 | Some(Value::Number(n)) => Some(n.to_string()), |
| 410 | _ => None, |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | fn str_array(fm: &Map<String, Value>, key: &str) -> Vec<String> { |
| 415 | match fm.get(key) { |
no test coverage detected