From 746c348f739a8d5f26d4cd76ed72646a338271c4 Mon Sep 17 00:00:00 2001 From: WriterV2 Date: Tue, 23 Aug 2022 19:24:17 +0200 Subject: Modify function to create tera context for stories --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 4be987f..3985b06 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,14 +22,14 @@ fn main() { std::fs::write("docs/index.html", output) .expect("Failed to write rendered output to index.html"); - let mut file = match std::fs::File::open(std::path::PathBuf::from("stories.json")) { + let file = match std::fs::File::open(std::path::PathBuf::from("stories.json")) { Ok(file) => file, Err(err) => panic!("Trying to open stories.json in readmode - {:?}", err), }; let stories = works::stories::Stories::new_from_file(file); - println!("Stories: {:?}", stories); + println!("Stories: {:?}\n", stories); let context = stories.create_tera_context(); - println!("{:?}", context); + println!("Context: {:?}\n", context); } -- cgit v1.2.3