(config: &serde_json::Value, path: &Path)
| 503 | } |
| 504 | |
| 505 | fn ensure_json_object(config: &serde_json::Value, path: &Path) -> Result<()> { |
| 506 | if config.is_object() { |
| 507 | Ok(()) |
| 508 | } else { |
| 509 | Err(TraceDecayError::Config { |
| 510 | message: format!("{} must contain a JSON object", path.display()), |
| 511 | }) |
| 512 | } |
| 513 | } |
| 514 | |
| 515 | fn ensure_child_object(config: &mut serde_json::Value, key: &str, path: &Path) -> Result<()> { |
| 516 | if config.get(key).is_none() { |
no outgoing calls
no test coverage detected