Skip to content

Commit

Permalink
clippy and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
faldor20 committed Mar 11, 2024
1 parent 2566d0f commit 87af8bd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions crates/lang_srv/src/analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ impl<'a> AnalyzedDocumentBuilder<'a> {
&mut self,
imports: MutSet<ModuleId>,
) -> HashMap<ModuleId, Arc<Vec<(Symbol, Variable)>>> {
let imports = imports
imports
.into_iter()
.map(|id| {
(
Expand All @@ -332,8 +332,7 @@ impl<'a> AnalyzedDocumentBuilder<'a> {
.clone(),
)
})
.collect::<HashMap<_, _>>();
imports
.collect::<HashMap<_, _>>()
}

fn build_diagnostics(
Expand Down
4 changes: 2 additions & 2 deletions crates/lang_srv/src/analysis/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ pub fn get_completion_items(
subs: &mut Subs,
module_id: &ModuleId,
interns: &Interns,
exposed_imports: &Vec<(Symbol, Variable)>,
exposed_imports: &[(Symbol, Variable)],
) -> Vec<CompletionItem> {
let mut completions = get_completions(position, decls, prefix, interns);
completions.extend(exposed_imports);
Expand Down Expand Up @@ -361,7 +361,7 @@ pub(super) fn get_module_completion_items(
}

fn get_module_exposed_completion(
exposed_symbols: &Vec<(Symbol, Variable)>,
exposed_symbols: &[(Symbol, Variable)],
modules_info: &ModulesInfo,
mod_id: &ModuleId,
interns: &Interns,
Expand Down
4 changes: 2 additions & 2 deletions crates/lang_srv/src/analysis/completion/formatting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fn module_exposed_list(
module_id: &ModuleId,
interns: &Interns,
modules_info: &ModulesInfo,
exposed: &Vec<(Symbol, Variable)>,
exposed: &[(Symbol, Variable)],
) -> Option<std::string::String> {
modules_info.with_subs(module_id, |subs| {
let items = exposed
Expand Down Expand Up @@ -38,7 +38,7 @@ pub(super) fn module_documentation(
description_type: DescriptionsType,
module_id: &ModuleId,
interns: &Interns,
exposed: &Vec<(Symbol, Variable)>,
exposed: &[(Symbol, Variable)],
modules_info: &ModulesInfo,
) -> Documentation {
let exposed_string =
Expand Down

0 comments on commit 87af8bd

Please sign in to comment.