(fm: &Map<String, Value>, key: &str)
| 339 | } |
| 340 | |
| 341 | fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> { |
| 342 | match fm.get(key) { |
| 343 | Some(Value::String(s)) if !s.is_empty() => Some(s.clone()), |
| 344 | Some(Value::Number(n)) => Some(n.to_string()), |
| 345 | _ => None, |
| 346 | } |
| 347 | } |
| 348 | |
| 349 | fn str_array(fm: &Map<String, Value>, key: &str) -> Vec<String> { |
| 350 | match fm.get(key) { |
no test coverage detected