Parse a .msg file from a path
(path: &Path, package: &str)
| 5 | |
| 6 | /// Parse a .msg file from a path |
| 7 | pub fn parse_msg_file(path: &Path, package: &str) -> Result<ParsedMessage> { |
| 8 | let source = std::fs::read_to_string(path) |
| 9 | .with_context(|| format!("Failed to read {}", path.display()))?; |
| 10 | parse_msg_string(&source, package, path) |
| 11 | } |
| 12 | |
| 13 | /// Parse a .msg file from a string |
| 14 | pub fn parse_msg_string(source: &str, package: &str, path: &Path) -> Result<ParsedMessage> { |
no test coverage detected