aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/generics.rs
diff options
context:
space:
mode:
authorClemens Wasser <[email protected]>2021-06-07 12:59:01 +0100
committerClemens Wasser <[email protected]>2021-06-21 15:40:21 +0100
commit47747cd4120e260a144242aadd7732e11d133fe4 (patch)
treeba767d7da808c050e313446ac4cb90d810d0f4de /crates/hir_def/src/generics.rs
parent4402f2b280f58896ed0696f4243d88a58fd970ca (diff)
Apply some clippy suggestions
Diffstat (limited to 'crates/hir_def/src/generics.rs')
-rw-r--r--crates/hir_def/src/generics.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/hir_def/src/generics.rs b/crates/hir_def/src/generics.rs
index 0f04b2bae..096ac7968 100644
--- a/crates/hir_def/src/generics.rs
+++ b/crates/hir_def/src/generics.rs
@@ -104,7 +104,7 @@ impl GenericParams {
104 ) -> Interned<GenericParams> { 104 ) -> Interned<GenericParams> {
105 let _p = profile::span("generic_params_query"); 105 let _p = profile::span("generic_params_query");
106 106
107 let generics = match def { 107 match def {
108 GenericDefId::FunctionId(id) => { 108 GenericDefId::FunctionId(id) => {
109 let id = id.lookup(db).id; 109 let id = id.lookup(db).id;
110 let tree = id.item_tree(db); 110 let tree = id.item_tree(db);
@@ -150,8 +150,7 @@ impl GenericParams {
150 GenericDefId::EnumVariantId(_) | GenericDefId::ConstId(_) => { 150 GenericDefId::EnumVariantId(_) | GenericDefId::ConstId(_) => {
151 Interned::new(GenericParams::default()) 151 Interned::new(GenericParams::default())
152 } 152 }
153 }; 153 }
154 generics
155 } 154 }
156 155
157 fn new(db: &dyn DefDatabase, def: GenericDefId) -> (GenericParams, InFile<SourceMap>) { 156 fn new(db: &dyn DefDatabase, def: GenericDefId) -> (GenericParams, InFile<SourceMap>) {