Skip to content

Commit 6f6afae

Browse files
committed
Small refactor
1 parent 6c86eba commit 6f6afae

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2295,20 +2295,19 @@ impl Clean<Item> for (&hir::MacroDef<'_>, Option<Symbol>) {
22952295
)
22962296
} else {
22972297
let vis = item.vis.clean(cx);
2298-
let vis_printed_with_space =
2299-
vis.print_with_space(cx.tcx, cx.tcx.hir().local_def_id(item.hir_id).to_def_id());
2298+
let def_id = cx.tcx.hir().local_def_id(item.hir_id).to_def_id();
23002299

23012300
if matchers.len() <= 1 {
23022301
format!(
23032302
"{}macro {}{} {{\n ...\n}}",
2304-
vis_printed_with_space,
2303+
vis.print_with_space(cx.tcx, def_id),
23052304
name,
23062305
matchers.iter().map(|span| span.to_src(cx)).collect::<String>(),
23072306
)
23082307
} else {
23092308
format!(
23102309
"{}macro {} {{\n{}}}",
2311-
vis_printed_with_space,
2310+
vis.print_with_space(cx.tcx, def_id),
23122311
name,
23132312
matchers
23142313
.iter()

0 commit comments

Comments
 (0)