(fm: &Map<String, Value>, key: &str)
| 235 | } |
| 236 | |
| 237 | fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> { |
| 238 | match fm.get(key) { |
| 239 | Some(Value::String(s)) if !s.is_empty() => Some(s.clone()), |
| 240 | Some(Value::Number(n)) => Some(n.to_string()), |
| 241 | _ => None, |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | fn str_array(fm: &Map<String, Value>, key: &str) -> Vec<String> { |
| 246 | match fm.get(key) { |
no test coverage detected