Skip to content

Commit 27b362b

Browse files
committed
Reformat
1 parent 757e593 commit 27b362b

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

crates/ra_hir/src/from_source.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,11 @@ impl Module {
262262

263263
let original_file = src.file_id.original_file(db);
264264

265-
let (krate, local_id) =
266-
db.relevant_crates(original_file).iter().find_map(|&crate_id| {
267-
let crate_def_map = db.crate_def_map(crate_id);
268-
let local_id = crate_def_map.modules_for_file(original_file).next()?;
269-
Some((crate_id, local_id))
270-
})?;
265+
let (krate, local_id) = db.relevant_crates(original_file).iter().find_map(|&crate_id| {
266+
let crate_def_map = db.crate_def_map(crate_id);
267+
let local_id = crate_def_map.modules_for_file(original_file).next()?;
268+
Some((crate_id, local_id))
269+
})?;
271270
Some(Module { id: ModuleId { krate, local_id } })
272271
}
273272
}

crates/ra_hir_def/src/nameres/collector.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,7 @@ where
682682
}
683683

684684
fn define_def(&mut self, def: &raw::DefData) {
685-
let module =
686-
ModuleId { krate: self.def_collector.def_map.krate, local_id: self.module_id };
685+
let module = ModuleId { krate: self.def_collector.def_map.krate, local_id: self.module_id };
687686
let ctx = LocationCtx::new(self.def_collector.db, module, self.file_id);
688687

689688
let name = def.name.clone();

crates/ra_ide/src/syntax_highlighting.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,7 @@ fn bar() {
332332
"#
333333
.trim(),
334334
);
335-
let dst_file =
336-
project_dir().join("crates/ra_ide/src/snapshots/rainbow_highlighting.html");
335+
let dst_file = project_dir().join("crates/ra_ide/src/snapshots/rainbow_highlighting.html");
337336
let actual_html = &analysis.highlight_as_html(file_id, true).unwrap();
338337
let expected_html = &read_text(&dst_file);
339338
std::fs::write(dst_file, &actual_html).unwrap();

0 commit comments

Comments
 (0)