(fm: &Map<String, Value>, key: &str)
| 322 | } |
| 323 | |
| 324 | fn require_str(fm: &Map<String, Value>, key: &str) -> Result<String> { |
| 325 | opt_str(fm, key).ok_or_else(|| CanonicalError::Lift(format!("frontmatter missing '{key}'"))) |
| 326 | } |
| 327 | |
| 328 | fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> { |
| 329 | match fm.get(key) { |
no test coverage detected