(fm: &Map<String, Value>, key: &str)
| 226 | } |
| 227 | |
| 228 | fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> { |
| 229 | match fm.get(key) { |
| 230 | Some(Value::String(s)) if !s.is_empty() => Some(s.clone()), |
| 231 | Some(Value::Number(n)) => Some(n.to_string()), |
| 232 | _ => None, |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | fn str_array(fm: &Map<String, Value>, key: &str) -> Vec<String> { |
| 237 | match fm.get(key) { |
no test coverage detected