(fm: &Map<String, Value>, key: &str)
| 249 | } |
| 250 | |
| 251 | fn require_str(fm: &Map<String, Value>, key: &str) -> Result<String> { |
| 252 | opt_str(fm, key).ok_or_else(|| CanonicalError::Lift(format!("frontmatter missing '{key}'"))) |
| 253 | } |
| 254 | |
| 255 | fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> { |
| 256 | match fm.get(key) { |
no test coverage detected