Address nightly clippy warnings
This commit is contained in:
parent
ed1a745442
commit
cad14c6b46
5 changed files with 6 additions and 13 deletions
|
@ -326,7 +326,7 @@ impl ProgressStatus {
|
||||||
pub fn progress(&self) -> Option<&lsp::WorkDoneProgress> {
|
pub fn progress(&self) -> Option<&lsp::WorkDoneProgress> {
|
||||||
match &self {
|
match &self {
|
||||||
ProgressStatus::Created => None,
|
ProgressStatus::Created => None,
|
||||||
ProgressStatus::Started(progress) => Some(&progress),
|
ProgressStatus::Started(progress) => Some(progress),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ impl Args {
|
||||||
|
|
||||||
iter.next(); // skip the program, we don't care about that
|
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() {
|
match arg.as_str() {
|
||||||
"--" => break, // stop parsing at this point treat the remaining as files
|
"--" => break, // stop parsing at this point treat the remaining as files
|
||||||
"--version" => args.display_version = true,
|
"--version" => args.display_version = true,
|
||||||
|
|
|
@ -80,7 +80,7 @@ impl<T: Item> Menu<T> {
|
||||||
let text = option.filter_text();
|
let text = option.filter_text();
|
||||||
// TODO: using fuzzy_indices could give us the char idx for match highlighting
|
// TODO: using fuzzy_indices could give us the char idx for match highlighting
|
||||||
matcher
|
matcher
|
||||||
.fuzzy_match(&text, pattern)
|
.fuzzy_match(text, pattern)
|
||||||
.map(|score| (index, score))
|
.map(|score| (index, score))
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
|
@ -155,9 +155,7 @@ pub mod completers {
|
||||||
let mut matches: Vec<_> = names
|
let mut matches: Vec<_> = names
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(|(range, name)| {
|
.filter_map(|(range, name)| {
|
||||||
matcher
|
matcher.fuzzy_match(&name, input).map(|score| (name, score))
|
||||||
.fuzzy_match(&name, &input)
|
|
||||||
.map(|score| (name, score))
|
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,7 @@ use cassowary::{
|
||||||
{Expression, Solver},
|
{Expression, Solver},
|
||||||
};
|
};
|
||||||
use helix_view::graphics::{Rect, Style};
|
use helix_view::graphics::{Rect, Style};
|
||||||
use std::{
|
use std::collections::HashMap;
|
||||||
collections::HashMap,
|
|
||||||
iter::{self, Iterator},
|
|
||||||
};
|
|
||||||
use unicode_width::UnicodeWidthStr;
|
use unicode_width::UnicodeWidthStr;
|
||||||
|
|
||||||
/// A [`Cell`] contains the [`Text`] to be displayed in a [`Row`] of a [`Table`].
|
/// A [`Cell`] contains the [`Text`] to be displayed in a [`Row`] of a [`Table`].
|
||||||
|
@ -415,9 +412,7 @@ impl<'a> Table<'a> {
|
||||||
let has_selection = state.selected.is_some();
|
let has_selection = state.selected.is_some();
|
||||||
let columns_widths = self.get_columns_widths(table_area.width, has_selection);
|
let columns_widths = self.get_columns_widths(table_area.width, has_selection);
|
||||||
let highlight_symbol = self.highlight_symbol.unwrap_or("");
|
let highlight_symbol = self.highlight_symbol.unwrap_or("");
|
||||||
let blank_symbol = iter::repeat(" ")
|
let blank_symbol = " ".repeat(highlight_symbol.width());
|
||||||
.take(highlight_symbol.width())
|
|
||||||
.collect::<String>();
|
|
||||||
let mut current_height = 0;
|
let mut current_height = 0;
|
||||||
let mut rows_height = table_area.height;
|
let mut rows_height = table_area.height;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue