From 61f3a438d3a729a6be941bca1ff4c6a97a33f221 Mon Sep 17 00:00:00 2001 From: "Jeremy A. Kolb" Date: Mon, 15 Oct 2018 17:44:23 -0400 Subject: Cargo Format Run `cargo fmt` and ignore generated files --- crates/ra_analysis/src/module_map.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'crates/ra_analysis/src/module_map.rs') diff --git a/crates/ra_analysis/src/module_map.rs b/crates/ra_analysis/src/module_map.rs index c1799e3d4..ff0ec3cc7 100644 --- a/crates/ra_analysis/src/module_map.rs +++ b/crates/ra_analysis/src/module_map.rs @@ -1,10 +1,11 @@ -use std::sync::Arc; use crate::{ - FileId, - db::{SyntaxDatabase}, + db::SyntaxDatabase, descriptors::{ModuleDescriptor, ModuleTreeDescriptor}, + FileId, }; +use std::sync::Arc; + salsa::query_group! { pub(crate) trait ModulesDatabase: SyntaxDatabase { fn module_tree(key: ()) -> Arc { @@ -16,7 +17,6 @@ salsa::query_group! { } } - fn module_descriptor(db: &impl ModulesDatabase, file_id: FileId) -> Arc { let file = db.file_syntax(file_id); Arc::new(ModuleDescriptor::new(file.ast())) @@ -29,6 +29,9 @@ fn module_tree(db: &impl ModulesDatabase, (): ()) -> Arc { let module_descr = db.module_descriptor(file_id); files.push((file_id, module_descr)); } - let res = ModuleTreeDescriptor::new(files.iter().map(|(file_id, descr)| (*file_id, &**descr)), &file_set.resolver); + let res = ModuleTreeDescriptor::new( + files.iter().map(|(file_id, descr)| (*file_id, &**descr)), + &file_set.resolver, + ); Arc::new(res) } -- cgit v1.2.3