(fm: &Map<String, Value>, key: &str)
| 400 | } |
| 401 | |
| 402 | fn require_str(fm: &Map<String, Value>, key: &str) -> Result<String> { |
| 403 | opt_str(fm, key).ok_or_else(|| CanonicalError::Lift(format!("frontmatter missing '{key}'"))) |
| 404 | } |
| 405 | |
| 406 | fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> { |
| 407 | match fm.get(key) { |
no test coverage detected