(args: &Dictionary, key: &str)
| 1218 | } |
| 1219 | |
| 1220 | fn string_value(args: &Dictionary, key: &str) -> Option<String> { |
| 1221 | args.get(key) |
| 1222 | .and_then(Value::as_string) |
| 1223 | .map(str::to_owned) |
| 1224 | .filter(|value| !value.is_empty()) |
| 1225 | } |
| 1226 | |
| 1227 | fn bool_value(args: &Dictionary, key: &str) -> Option<bool> { |
| 1228 | args.get(key).and_then(Value::as_boolean) |
no test coverage detected