From 47747cd4120e260a144242aadd7732e11d133fe4 Mon Sep 17 00:00:00 2001 From: Clemens Wasser Date: Mon, 7 Jun 2021 13:59:01 +0200 Subject: Apply some clippy suggestions --- crates/hir_def/src/generics.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/hir_def/src/generics.rs') 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 { ) -> Interned { let _p = profile::span("generic_params_query"); - let generics = match def { + match def { GenericDefId::FunctionId(id) => { let id = id.lookup(db).id; let tree = id.item_tree(db); @@ -150,8 +150,7 @@ impl GenericParams { GenericDefId::EnumVariantId(_) | GenericDefId::ConstId(_) => { Interned::new(GenericParams::default()) } - }; - generics + } } fn new(db: &dyn DefDatabase, def: GenericDefId) -> (GenericParams, InFile) { -- cgit v1.2.3