(material: &HashMap<String, String>, key: &str)
| 661 | } |
| 662 | |
| 663 | fn required_material(material: &HashMap<String, String>, key: &str) -> Result<String, Status> { |
| 664 | material_value(material, &[key]) |
| 665 | .ok_or_else(|| Status::invalid_argument(format!("{key} material is required"))) |
| 666 | } |
| 667 | |
| 668 | fn material_value(material: &HashMap<String, String>, keys: &[&str]) -> Option<String> { |
| 669 | for key in keys { |
no test coverage detected