From 687bec117c0a59dc58daf5c9954c906eeb60de21 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 13 Mar 2020 17:58:49 +0100 Subject: Don't use generic DB where a concrete one will do --- crates/ra_assists/src/handlers/fill_match_arms.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'crates/ra_assists') diff --git a/crates/ra_assists/src/handlers/fill_match_arms.rs b/crates/ra_assists/src/handlers/fill_match_arms.rs index e5d8c639d..97cf90ae4 100644 --- a/crates/ra_assists/src/handlers/fill_match_arms.rs +++ b/crates/ra_assists/src/handlers/fill_match_arms.rs @@ -2,7 +2,7 @@ use std::iter; -use hir::{db::HirDatabase, Adt, HasSource, Semantics}; +use hir::{Adt, HasSource, Semantics}; use ra_syntax::ast::{self, edit::IndentLevel, make, AstNode, NameOwner}; use crate::{Assist, AssistCtx, AssistId}; @@ -88,11 +88,7 @@ fn resolve_enum_def(sema: &Semantics, expr: &ast::Expr) -> Option< }) } -fn build_pat( - db: &impl HirDatabase, - module: hir::Module, - var: hir::EnumVariant, -) -> Option { +fn build_pat(db: &RootDatabase, module: hir::Module, var: hir::EnumVariant) -> Option { let path = crate::ast_transform::path_to_ast(module.find_use_path(db, var.into())?); // FIXME: use HIR for this; it doesn't currently expose struct vs. tuple vs. unit variants though -- cgit v1.2.3