1
Fork 0

Include file name in frontmatter parsing error print.

This commit is contained in:
Bauke 2023-01-08 12:51:04 +01:00
parent 4f206aa95e
commit aa6da0069b
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 2 additions and 2 deletions

View File

@ -39,12 +39,12 @@ pub fn write_all(public_dir: &Path) -> Result<()> {
continue;
}
let file_contents = fs::read_to_string(file_path)?;
let file_contents = fs::read_to_string(&file_path)?;
let (video_data, markdown) =
match toml_frontmatter::parse::<VideoData>(&file_contents) {
Ok(parsed) => parsed,
Err(error) => {
println!("{error}");
println!("{:?} {}", file_path.file_name().unwrap(), error);
continue;
}
};