diff options
Diffstat (limited to 'src/gui')
| -rw-r--r-- | src/gui/mod.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/mod.rs b/src/gui/mod.rs index a32ceff..5677db1 100644 --- a/src/gui/mod.rs +++ b/src/gui/mod.rs @@ -81,7 +81,7 @@ async fn load_file() -> Index { let file = file.unwrap(); let file = file.to_str(); let file = file.unwrap(); - Index::from_file(file) + Index::from_file(file.to_string()) } async fn generate() -> Index { @@ -100,11 +100,13 @@ async fn generate() -> Index { let input = input.unwrap(); let input = input.to_str(); let input = input.unwrap(); - Index::generate(input, file, |counter, nof| { + let index = Index::generate(input, |counter, nof| { let p = ((counter * 100) / nof) as u8; *GENERATE_PROGRESS.lock().unwrap() = p; std::io::stdout().flush().ok(); - }) + }); + index.save(file.to_string()); + index } async fn generate_update_timer() -> u8 { |