(fm: &Map<String, Value>, key: &str)
| 266 | } |
| 267 | |
| 268 | fn require_str(fm: &Map<String, Value>, key: &str) -> Result<String> { |
| 269 | opt_str(fm, key).ok_or_else(|| CanonicalError::Lift(format!("frontmatter missing '{key}'"))) |
| 270 | } |
| 271 | |
| 272 | fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> { |
| 273 | match fm.get(key) { |
no test coverage detected