aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
authorAlan Du <[email protected]>2019-06-03 15:01:10 +0100
committerAlan Du <[email protected]>2019-06-04 23:05:07 +0100
commitecd420636efe54657ae742ce960ce061740ef108 (patch)
tree612606f7a9f093375a946a69078041f095eb0d8b /crates/ra_ide_api/src
parent354db651dafd24d93cf0f151d63ad5ecb2e716e2 (diff)
Fix clippy::single_match
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/completion/complete_dot.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs
index 5bf289c63..0822a0e7e 100644
--- a/crates/ra_ide_api/src/completion/complete_dot.rs
+++ b/crates/ra_ide_api/src/completion/complete_dot.rs
@@ -16,8 +16,8 @@ pub(super) fn complete_dot(acc: &mut Completions, ctx: &CompletionContext) {
16 16
17fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) { 17fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) {
18 for receiver in receiver.autoderef(ctx.db) { 18 for receiver in receiver.autoderef(ctx.db) {
19 match receiver { 19 if let Ty::Apply(a_ty) = receiver {
20 Ty::Apply(a_ty) => match a_ty.ctor { 20 match a_ty.ctor {
21 TypeCtor::Adt(AdtDef::Struct(s)) => { 21 TypeCtor::Adt(AdtDef::Struct(s)) => {
22 for field in s.fields(ctx.db) { 22 for field in s.fields(ctx.db) {
23 acc.add_field(ctx, field, &a_ty.parameters); 23 acc.add_field(ctx, field, &a_ty.parameters);
@@ -30,8 +30,7 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty)
30 } 30 }
31 } 31 }
32 _ => {} 32 _ => {}
33 }, 33 }
34 _ => {}
35 }; 34 };
36 } 35 }
37} 36}