Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/completions/vis.rs')
-rw-r--r--crates/ide-completion/src/completions/vis.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ide-completion/src/completions/vis.rs b/crates/ide-completion/src/completions/vis.rs
index 38761f77a2..28d906d91c 100644
--- a/crates/ide-completion/src/completions/vis.rs
+++ b/crates/ide-completion/src/completions/vis.rs
@@ -20,11 +20,11 @@ pub(crate) fn complete_vis_path(
// Try completing next child module of the path that is still a parent of the current module
let next_towards_current =
ctx.module.path_to_root(ctx.db).into_iter().take_while(|it| it != module).last();
- if let Some(next) = next_towards_current {
- if let Some(name) = next.name(ctx.db) {
- cov_mark::hit!(visibility_qualified);
- acc.add_module(ctx, path_ctx, next, name, vec![]);
- }
+ if let Some(next) = next_towards_current
+ && let Some(name) = next.name(ctx.db)
+ {
+ cov_mark::hit!(visibility_qualified);
+ acc.add_module(ctx, path_ctx, next, name, vec![]);
}
acc.add_super_keyword(ctx, *super_chain_len);