Drop some unused methods

This commit is contained in:
Aleksey Kladov 2019-12-08 12:20:59 +01:00
parent 200bda3daf
commit 7aacf9a197
2 changed files with 5 additions and 49 deletions

View file

@ -216,8 +216,10 @@ impl Module {
}
}?;
let child_name = src.value.name()?;
parent_module.child(db, &child_name.as_name())
let child_name = src.value.name()?.as_name();
let def_map = db.crate_def_map(parent_module.id.krate);
let child_id = def_map[parent_module.id.local_id].children.get(&child_name)?;
Some(parent_module.with_module_id(*child_id))
}
pub fn from_definition(db: &impl DefDatabase, src: InFile<ModuleSource>) -> Option<Self> {