diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2022-10-23 21:29:17 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2022-10-23 21:29:17 +0200 |
| commit | ed0404753c77c09f78b2c41b55b0cf9a68d95585 (patch) | |
| tree | c57bf7f34dc1271be169cd79d47fe29aac8960bc /src/generation.rs | |
| parent | c04487126bb50e29b5f25cf4ece5f00522b9160d (diff) | |
| download | gof-rs-ed0404753c77c09f78b2c41b55b0cf9a68d95585.tar.xz gof-rs-ed0404753c77c09f78b2c41b55b0cf9a68d95585.zip | |
removed all the hardcoded paths and replaced them with a for loop
Diffstat (limited to 'src/generation.rs')
| -rw-r--r-- | src/generation.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/generation.rs b/src/generation.rs index 4031c46..63aa3e3 100644 --- a/src/generation.rs +++ b/src/generation.rs @@ -17,7 +17,7 @@ use std::{ error::Error, fs::File, io::{self, BufRead, BufReader, Write}, - path::Path, + path::PathBuf, thread::sleep, time::Duration, }; @@ -159,7 +159,7 @@ pub fn next_gen(app: &mut App) -> Gen { nxt_gen } -pub fn gen_from_file(path: &Path) -> Gen { +pub fn gen_from_file(path: &PathBuf) -> Gen { let mut gen = Gen::new(); let file = File::open(path).expect("File not found"); let reader = BufReader::new(file); |
