aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/args.rs2
-rw-r--r--helix-term/src/ui/menu.rs2
-rw-r--r--helix-term/src/ui/mod.rs4
3 files changed, 3 insertions, 5 deletions
diff --git a/helix-term/src/args.rs b/helix-term/src/args.rs
index e2bb07c6..f0ef09eb 100644
--- a/helix-term/src/args.rs
+++ b/helix-term/src/args.rs
@@ -17,7 +17,7 @@ impl Args {
iter.next(); // skip the program, we don't care about that
- while let Some(arg) = iter.next() {
+ for arg in &mut iter {
match arg.as_str() {
"--" => break, // stop parsing at this point treat the remaining as files
"--version" => args.display_version = true,
diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs
index f32ce01c..bf18b92b 100644
--- a/helix-term/src/ui/menu.rs
+++ b/helix-term/src/ui/menu.rs
@@ -80,7 +80,7 @@ impl<T: Item> Menu<T> {
let text = option.filter_text();
// TODO: using fuzzy_indices could give us the char idx for match highlighting
matcher
- .fuzzy_match(&text, pattern)
+ .fuzzy_match(text, pattern)
.map(|score| (index, score))
}),
);
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs
index a6adbe8d..2a4d246d 100644
--- a/helix-term/src/ui/mod.rs
+++ b/helix-term/src/ui/mod.rs
@@ -155,9 +155,7 @@ pub mod completers {
let mut matches: Vec<_> = names
.into_iter()
.filter_map(|(range, name)| {
- matcher
- .fuzzy_match(&name, &input)
- .map(|score| (name, score))
+ matcher.fuzzy_match(&name, input).map(|score| (name, score))
})
.collect();