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_hir/src/code_model.rs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 5766cc3b8..839eb475e 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs @@ -192,11 +192,11 @@ impl ModuleDef { ModuleDef::Function(m) => Some(m.name(db)), ModuleDef::Adt(m) => Some(m.name(db)), ModuleDef::EnumVariant(m) => Some(m.name(db)), - ModuleDef::Const(m) => {m.name(db)}, - ModuleDef::Static(m) => {m.name(db)}, - ModuleDef::Trait(m) => {Some(m.name(db))}, - ModuleDef::TypeAlias(m) => {Some(m.name(db))}, - ModuleDef::BuiltinType(m) => {Some(m.as_name())} + ModuleDef::Const(m) => m.name(db), + ModuleDef::Static(m) => m.name(db), + ModuleDef::Trait(m) => Some(m.name(db)), + ModuleDef::TypeAlias(m) => Some(m.name(db)), + ModuleDef::BuiltinType(m) => Some(m.as_name()), } } @@ -205,13 +205,17 @@ impl ModuleDef { ModuleDef::Module(m) => Into::::into(m.clone()).resolver(db), ModuleDef::Function(f) => Into::::into(f.clone()).resolver(db), ModuleDef::Adt(adt) => Into::::into(adt.clone()).resolver(db), - ModuleDef::EnumVariant(ev) => Into::::into(Into::::into(ev.clone())).resolver(db), - ModuleDef::Const(c) => Into::::into(Into::::into(c.clone())).resolver(db), + ModuleDef::EnumVariant(ev) => { + Into::::into(Into::::into(ev.clone())).resolver(db) + } + ModuleDef::Const(c) => { + Into::::into(Into::::into(c.clone())).resolver(db) + } ModuleDef::Static(s) => Into::::into(s.clone()).resolver(db), ModuleDef::Trait(t) => Into::::into(t.clone()).resolver(db), ModuleDef::TypeAlias(t) => Into::::into(t.module(db)).resolver(db), - // TODO: This should be a resolver relative to `std` - ModuleDef::BuiltinType(_t) => None? + // FIXME: This should be a resolver relative to `std/core` + ModuleDef::BuiltinType(_t) => None?, }) } } -- cgit v1.2.3