(fm: &Map<String, Value>, key: &str)
| 253 | } |
| 254 | |
| 255 | fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> { |
| 256 | match fm.get(key) { |
| 257 | Some(Value::String(s)) if !s.is_empty() => Some(s.clone()), |
| 258 | Some(Value::Number(n)) => Some(n.to_string()), |
| 259 | _ => None, |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | fn str_array(fm: &Map<String, Value>, key: &str) -> Vec<String> { |
| 264 | match fm.get(key) { |
no test coverage detected