Skip to content

Commit c6f23b7

Browse files
revert nightly rustfmt formatting that accidentally slipped in
cf. rust-lang#99603 cf. rust-lang/rust-analyzer#12871 (comment)
1 parent 957f3b9 commit c6f23b7

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

src/tools/rust-analyzer/crates/hir-def/src/import_map.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,11 @@ fn collect_import_map(db: &dyn DefDatabase, krate: CrateId) -> ImportMap {
167167

168168
let visible_items = mod_data.scope.entries().filter_map(|(name, per_ns)| {
169169
let per_ns = per_ns.filter_visibility(|vis| vis == Visibility::Public);
170-
if per_ns.is_none() { None } else { Some((name, per_ns)) }
170+
if per_ns.is_none() {
171+
None
172+
} else {
173+
Some((name, per_ns))
174+
}
171175
});
172176

173177
for (name, per_ns) in visible_items {

src/tools/rust-analyzer/crates/hir-def/src/nameres.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,11 @@ impl DefMap {
334334

335335
pub(crate) fn crate_root(&self, db: &dyn DefDatabase) -> ModuleId {
336336
self.with_ancestor_maps(db, self.root, &mut |def_map, _module| {
337-
if def_map.block.is_none() { Some(def_map.module_id(def_map.root)) } else { None }
337+
if def_map.block.is_none() {
338+
Some(def_map.module_id(def_map.root))
339+
} else {
340+
None
341+
}
338342
})
339343
.expect("DefMap chain without root")
340344
}

src/tools/rust-analyzer/crates/proc-macro-test/build.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ fn main() {
6262
Command::new(toolchain::cargo())
6363
};
6464

65-
cmd
66-
.current_dir(&staging_dir)
65+
cmd.current_dir(&staging_dir)
6766
.args(&["build", "-p", "proc-macro-test-impl", "--message-format", "json"])
6867
// Explicit override the target directory to avoid using the same one which the parent
6968
// cargo is using, or we'll deadlock.

0 commit comments

Comments
 (0)