(fm: &Map<String, Value>, key: &str)
| 221 | } |
| 222 | |
| 223 | fn require_str(fm: &Map<String, Value>, key: &str) -> Result<String> { |
| 224 | opt_str(fm, key) |
| 225 | .ok_or_else(|| CanonicalError::Lift(format!("memory frontmatter missing '{key}'"))) |
| 226 | } |
| 227 | |
| 228 | fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> { |
| 229 | match fm.get(key) { |
no test coverage detected