Skip to content

Commit

Permalink
update comment formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sezna committed Aug 20, 2024
1 parent ea8be16 commit 1dacb68
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions language_service/src/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -774,17 +774,17 @@ fn callable_decl_to_completion_item(
// Everything that starts with a __ goes last in the list
let sort_group = u32::from(name.starts_with("__"));

// calculate the qualification that goes before the import
// item
// if an exact import already exists, or if that namespace
// is glob imported, then there is no qualification
let namespace_as_strs = Into::<Vec<_>>::into(callable_namespace);

// Now, we calculate the qualification that goes before the import
// item.
// if an exact import already exists, or if that namespace
// is glob imported, then there is no qualification.
// If there is no matching import or glob import, then the
// qualification is the full namespace name

// an exact import is an import that matches the namespace
// qualification is the full namespace name.
//
// An exact import is an import that matches the namespace
// and item name exactly
let namespace_as_strs = Into::<Vec<_>>::into(callable_namespace);
let preexisting_exact_import = imports.iter().any(|import_item| {
let import_item_namespace = &import_item.path[..import_item.path.len() - 1];
let import_item_name = import_item.path.last().map(|x| &**x);
Expand Down

0 comments on commit 1dacb68

Please sign in to comment.