Skip to content

Commit 9d2c1c7

Browse files
committed
Formatting change.
1 parent 83e4340 commit 9d2c1c7

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

File-Explorer/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ walkdir = "2.3"
1010
druid = "0.8.3"
1111
regex = "1.5"
1212

13-
1413
[profile.dev]
1514
panic = "abort"
1615

File-Explorer/src/main.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
use druid::{widget, AppLauncher, Data, Lens, LocalizedString, Widget, WidgetExt, WindowDesc};
22
use regex::Regex;
33

4-
5-
64
use std::path::{Path, PathBuf};
75
use std::sync::{mpsc, Arc, Mutex};
86
use std::thread;
@@ -51,11 +49,9 @@ fn build_ui() -> impl Widget<AppState> {
5149
.with_child(scrollable_label)
5250
}
5351

54-
fn search_files(
55-
root_path: &Path,
56-
search_term: &str,
57-
tx: Option<mpsc::Sender<SearchUpdate>>,
58-
) -> String {
52+
// This function takes in a root path and a search term and returns a string of the search results
53+
fn search_files(root_path: &Path, search_term: &str, tx: Option<mpsc::Sender<SearchUpdate>>) -> String {
54+
5955
let mut result = String::new();
6056
let search_term_regex = Regex::new(&format!(r"(?i){}", search_term)).expect("Invalid regex");
6157

0 commit comments

Comments
 (0)