From 806ea03b64455a0c10fd8a8d6d98ed4e7ac15058 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 28 Nov 2018 01:22:17 +0300 Subject: drop descriptor suffix, use hir:: instead --- crates/ra_analysis/src/hir/function/mod.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'crates/ra_analysis/src/hir/function/mod.rs') diff --git a/crates/ra_analysis/src/hir/function/mod.rs b/crates/ra_analysis/src/hir/function/mod.rs index d171b6a8d..9ca8f4e7c 100644 --- a/crates/ra_analysis/src/hir/function/mod.rs +++ b/crates/ra_analysis/src/hir/function/mod.rs @@ -25,43 +25,43 @@ impl FnId { } } -pub(crate) struct FunctionDescriptor { +pub(crate) struct Function { fn_id: FnId, } -impl FunctionDescriptor { +impl Function { pub(crate) fn guess_from_source( db: &impl HirDatabase, file_id: FileId, fn_def: ast::FnDef, - ) -> FunctionDescriptor { + ) -> Function { let fn_id = FnId::get(db, file_id, fn_def); - FunctionDescriptor { fn_id } + Function { fn_id } } pub(crate) fn guess_for_name_ref( db: &impl HirDatabase, file_id: FileId, name_ref: ast::NameRef, - ) -> Option { - FunctionDescriptor::guess_for_node(db, file_id, name_ref.syntax()) + ) -> Option { + Function::guess_for_node(db, file_id, name_ref.syntax()) } pub(crate) fn guess_for_bind_pat( db: &impl HirDatabase, file_id: FileId, bind_pat: ast::BindPat, - ) -> Option { - FunctionDescriptor::guess_for_node(db, file_id, bind_pat.syntax()) + ) -> Option { + Function::guess_for_node(db, file_id, bind_pat.syntax()) } fn guess_for_node( db: &impl HirDatabase, file_id: FileId, node: SyntaxNodeRef, - ) -> Option { + ) -> Option { let fn_def = node.ancestors().find_map(ast::FnDef::cast)?; - let res = FunctionDescriptor::guess_from_source(db, file_id, fn_def); + let res = Function::guess_from_source(db, file_id, fn_def); Some(res) } -- cgit v1.2.3