diff options
| author | WriterV2 <primary-v2@protonmail.com> | 2022-08-23 19:24:17 +0200 |
|---|---|---|
| committer | WriterV2 <primary-v2@protonmail.com> | 2022-08-23 19:24:17 +0200 |
| commit | 746c348f739a8d5f26d4cd76ed72646a338271c4 (patch) | |
| tree | 818b38c82171bd48529e05ee98da15aab84aff55 /src/main.rs | |
| parent | f08b050c240f10b29d5c8af5e80f042c115cd49b (diff) | |
Modify function to create tera context for stories
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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); } |
