mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Remove superfluous early returns
This commit is contained in:
parent
85b68b1f7d
commit
d97a8ee865
8 changed files with 41 additions and 59 deletions
|
@ -65,11 +65,8 @@ pub(crate) fn complete_expr_path(acc: &mut Completions, ctx: &CompletionContext)
|
|||
.into_iter()
|
||||
.flat_map(|it| hir::Trait::from(it).items(ctx.sema.db))
|
||||
.for_each(|item| add_assoc_item(acc, ctx, item)),
|
||||
Qualified::With { resolution, .. } => {
|
||||
let resolution = match resolution {
|
||||
Some(it) => it,
|
||||
None => return,
|
||||
};
|
||||
Qualified::With { resolution: None, .. } => {}
|
||||
Qualified::With { resolution: Some(resolution), .. } => {
|
||||
// Add associated types on type parameters and `Self`.
|
||||
ctx.scope.assoc_type_shorthand_candidates(resolution, |_, alias| {
|
||||
acc.add_type_alias(ctx, alias);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue