diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-07-14 00:22:39 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-07-14 00:22:39 +0200 |
| commit | 149e0b6ae9871515be21f23b492f5ef7355e2ca4 (patch) | |
| tree | d5b1bf8281a3a1cf181d5c921a53dfd99fd8b7a9 /src/gui/mod.rs | |
| parent | 0723ea6b6bb6832b11582eeb8a330d2bdb6077b5 (diff) | |
make fast using hash instead of dictionary
Diffstat (limited to 'src/gui/mod.rs')
| -rw-r--r-- | src/gui/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/mod.rs b/src/gui/mod.rs index f56dd71..593eb65 100644 --- a/src/gui/mod.rs +++ b/src/gui/mod.rs @@ -210,8 +210,7 @@ impl Application for App { } Message::ExportResults => { let file = rfd::FileDialog::new().set_title("Export to File").add_filter("Raw Text", &["txt"]).save_file(); - if file.is_some() { - let file = file.unwrap(); + if let Some(file) = file { let mut file = File::create(file).unwrap(); for result in state.results.iter() { writeln!(file, "{}", result.path).ok(); |