Skip to content

Commit c3dbce1

Browse files
committed
cargo fmt
1 parent 638d7c2 commit c3dbce1

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

src/components/file_find_popup.rs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,26 @@ impl FileFindPopup {
8888
let matcher =
8989
fuzzy_matcher::skim::SkimMatcherV2::default();
9090

91-
let mut files =
92-
self.files.iter().enumerate().filter_map(|a| {
91+
let mut files = self
92+
.files
93+
.iter()
94+
.enumerate()
95+
.filter_map(|a| {
9396
a.1.path.to_str().and_then(|path| {
94-
matcher
95-
.fuzzy_indices(path, q)
96-
.map(|(score, indices)| (score, a.0, indices))
97+
matcher.fuzzy_indices(path, q).map(
98+
|(score, indices)| (score, a.0, indices),
99+
)
97100
})
98-
}).collect::<Vec<(_, _, _)>>();
101+
})
102+
.collect::<Vec<(_, _, _)>>();
99103

100-
files.sort_by(|(score1, _, _), (score2, _, _)| score2.cmp(score1));
104+
files.sort_by(|(score1, _, _), (score2, _, _)| {
105+
score2.cmp(score1)
106+
});
101107

102-
self.files_filtered.extend(files.into_iter().map(|entry| (entry.1, entry.2)));
108+
self.files_filtered.extend(
109+
files.into_iter().map(|entry| (entry.1, entry.2)),
110+
);
103111
}
104112

105113
self.selection = 0;

0 commit comments

Comments
 (0)