(fm: &Map<String, Value>, key: &str)
| 335 | } |
| 336 | |
| 337 | fn require_str(fm: &Map<String, Value>, key: &str) -> Result<String> { |
| 338 | opt_str(fm, key).ok_or_else(|| CanonicalError::Lift(format!("frontmatter missing '{key}'"))) |
| 339 | } |
| 340 | |
| 341 | fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> { |
| 342 | match fm.get(key) { |
no test coverage detected