Apply suggestions

This commit is contained in:
Deadbeef 2021-08-31 05:24:08 +00:00
parent 8096910b54
commit 5f1505e7f1
No known key found for this signature in database
GPG Key ID: 027DF9338862ADDD
2 changed files with 5 additions and 4 deletions

View File

@ -1642,8 +1642,7 @@ fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) {
if let Variants::Multiple { variants, tag, .. } = &ty_layout.layout.variants {
if !variants.is_empty() {
w.write_str(
"<p>\
<strong>Size for each variant:</strong>\
"<p><strong>Size for each variant:</strong></p>\
<ul>",
);
@ -1665,7 +1664,7 @@ fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) {
write_size_of_layout(w, layout, tag_size);
writeln!(w, "</li>");
}
w.write_str("</ul></p>");
w.write_str("</ul>");
}
}
}

View File

@ -53,7 +53,9 @@ pub struct Unsized([u8]);
// @!has type_layout/trait.MyTrait.html 'Size: '
pub trait MyTrait {}
// @has type_layout/enum.Variants.html '<code>A</code>: 0 bytes'
// @has type_layout/enum.Variants.html 'Size: '
// @has - '2 bytes'
// @has - '<code>A</code>: 0 bytes'
// @has - '<code>B</code>: 1 byte'
pub enum Variants {
A,