(fm: &Map<String, Value>, key: &str)
| 230 | } |
| 231 | |
| 232 | fn require_str(fm: &Map<String, Value>, key: &str) -> Result<String> { |
| 233 | opt_str(fm, key) |
| 234 | .ok_or_else(|| CanonicalError::Lift(format!("memory frontmatter missing '{key}'"))) |
| 235 | } |
| 236 | |
| 237 | fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> { |
| 238 | match fm.get(key) { |
no test coverage detected