From 10c50b140aa67f74a135e7a48ff6d954cc757cb8 Mon Sep 17 00:00:00 2001 From: Zac Pullar-Strecker Date: Tue, 16 Jun 2020 16:52:40 +1200 Subject: Format & replace todos with 'fixme' --- crates/ra_ide_db/src/defs.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'crates/ra_ide_db/src/defs.rs') diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs index a158169e3..b07395a64 100644 --- a/crates/ra_ide_db/src/defs.rs +++ b/crates/ra_ide_db/src/defs.rs @@ -6,8 +6,9 @@ // FIXME: this badly needs rename/rewrite (matklad, 2020-02-06). use hir::{ + db::{DefDatabase, HirDatabase}, Field, HasVisibility, ImplDef, Local, MacroDef, Module, ModuleDef, Name, PathResolution, - Semantics, TypeParam, Visibility, db::{DefDatabase, HirDatabase}, + Semantics, TypeParam, Visibility, }; use ra_prof::profile; use ra_syntax::{ @@ -16,7 +17,7 @@ use ra_syntax::{ }; use crate::RootDatabase; -use ra_hir_def::resolver::{Resolver, HasResolver}; +use ra_hir_def::resolver::{HasResolver, Resolver}; // FIXME: a more precise name would probably be `Symbol`? #[derive(Debug, PartialEq, Eq, Copy, Clone)] @@ -83,12 +84,14 @@ impl Definition { use ra_hir_def::*; Some(match self { Definition::ModuleDef(def) => def.resolver(db)?, - Definition::Field(field) => Into::::into(Into::::into(field.parent_def(db))).resolver(db), + Definition::Field(field) => { + Into::::into(Into::::into(field.parent_def(db))).resolver(db) + } Definition::Macro(m) => Into::::into(m.module(db)?).resolver(db), Definition::SelfType(imp) => Into::::into(imp.clone()).resolver(db), // it's possible, read probable, that other arms of this are also unreachable Definition::Local(_local) => unreachable!(), - Definition::TypeParam(tp) => Into::::into(tp.module(db)).resolver(db) + Definition::TypeParam(tp) => Into::::into(tp.module(db)).resolver(db), }) } } -- cgit v1.2.3