chore: Fix several style lints (#17488)

It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-09-06 11:58:39 +02:00 committed by GitHub
parent 93249fc82b
commit e6c1c51b37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
361 changed files with 3530 additions and 3587 deletions

View file

@ -243,7 +243,7 @@ impl LspAdapter for ExtensionLspAdapter {
language: &Arc<Language>,
) -> Result<Vec<Option<CodeLabel>>> {
let completions = completions
.into_iter()
.iter()
.map(|completion| wit::Completion::from(completion.clone()))
.collect::<Vec<_>>();
@ -276,7 +276,7 @@ impl LspAdapter for ExtensionLspAdapter {
language: &Arc<Language>,
) -> Result<Vec<Option<CodeLabel>>> {
let symbols = symbols
.into_iter()
.iter()
.cloned()
.map(|(name, kind)| wit::Symbol {
name,
@ -317,7 +317,7 @@ fn labels_from_wit(
} else {
language.highlight_text(&label.code.as_str().into(), 0..label.code.len())
};
build_code_label(&label, &runs, &language)
build_code_label(&label, &runs, language)
})
.collect()
}
@ -364,7 +364,7 @@ fn build_code_label(
.grammar()
.zip(span.highlight_name.as_ref())
.and_then(|(grammar, highlight_name)| {
grammar.highlight_id_for_name(&highlight_name)
grammar.highlight_id_for_name(highlight_name)
})
.unwrap_or_default();
let ix = text.len();