reformat the world

This commit is contained in:
Aleksey Kladov 2019-02-08 14:49:43 +03:00
parent 5cb1d41a30
commit 12e3b4c70b
129 changed files with 727 additions and 2509 deletions

View file

@ -12,10 +12,7 @@ use crate::{
impl Module {
fn with_module_id(&self, module_id: ModuleId) -> Module {
Module {
module_id,
krate: self.krate,
}
Module { module_id, krate: self.krate }
}
pub(crate) fn name_impl(&self, db: &impl HirDatabase) -> Option<Name> {
@ -42,10 +39,7 @@ impl Module {
) -> Option<(FileId, TreeArc<ast::Module>)> {
let module_tree = db.module_tree(self.krate);
let link = self.module_id.parent_link(&module_tree)?;
let file_id = link
.owner(&module_tree)
.file_id(&module_tree)
.as_original_file();
let file_id = link.owner(&module_tree).file_id(&module_tree).as_original_file();
let src = link.source(&module_tree, db);
Some((file_id, src))
}