diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-07-08 13:29:37 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-07-08 13:29:37 +0200 |
| commit | ae8fad30cd9e76bcba9949095a2cafabb4f1ca8a (patch) | |
| tree | d578b5ee0e1a559f2ae31a5966277876d5334268 /src/gui/mod.rs | |
| parent | 9257e158cd76027f148138e7bc94e5bd8a2a5035 (diff) | |
add merge functionality
Diffstat (limited to 'src/gui/mod.rs')
| -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 { |