Skip to content

Commit e6664c0

Browse files
committed
rustdoc: remove unnecessary binding
1 parent 2b728c1 commit e6664c0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/librustdoc/html/render/type_layout.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub(crate) fn document_type_layout<'a, 'cx: 'a>(
5656
} else {
5757
span_bug!(cx.tcx().def_span(ty_def_id), "tag is neither niche nor int")
5858
};
59-
let variants = variants
59+
variants
6060
.iter_enumerated()
6161
.map(|(variant_idx, variant_layout)| {
6262
let Adt(adt, _) = type_layout.ty.kind() else {
@@ -68,12 +68,11 @@ pub(crate) fn document_type_layout<'a, 'cx: 'a>(
6868
let size = variant_layout.size.bytes() - tag_size;
6969
let type_layout_size = TypeLayoutSize { is_unsized, is_uninhabited, size };
7070
(name, type_layout_size)
71-
}).collect();
72-
variants
71+
})
72+
.collect()
7373
} else {
7474
Vec::new()
75-
}
76-
;
75+
};
7776

7877
let type_layout_size = tcx.layout_of(param_env.and(ty)).map(|layout| {
7978
let is_unsized = layout.abi.is_unsized();

0 commit comments

Comments
 (0)