mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Add spacing between trait functions
This commit is contained in:
parent
4d4d76cf42
commit
12dccbde41
@ -2087,15 +2087,19 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
|
||||
if !consts.is_empty() && !required.is_empty() {
|
||||
w.write_str("\n")?;
|
||||
}
|
||||
for m in &required {
|
||||
for (pos, m) in required.iter().enumerate() {
|
||||
write!(w, " ")?;
|
||||
render_assoc_item(w, m, AssocItemLink::Anchor(None), ItemType::Trait)?;
|
||||
write!(w, ";\n")?;
|
||||
|
||||
if pos < required.len() - 1 {
|
||||
write!(w, "<div class='item-spacer'></div>")?;
|
||||
}
|
||||
}
|
||||
if !required.is_empty() && !provided.is_empty() {
|
||||
w.write_str("\n")?;
|
||||
}
|
||||
for m in &provided {
|
||||
for (pos, m) in provided.iter().enumerate() {
|
||||
write!(w, " ")?;
|
||||
render_assoc_item(w, m, AssocItemLink::Anchor(None), ItemType::Trait)?;
|
||||
match m.inner {
|
||||
@ -2106,6 +2110,9 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
|
||||
write!(w, " {{ ... }}\n")?;
|
||||
},
|
||||
}
|
||||
if pos < provided.len() - 1 {
|
||||
write!(w, "<div class='item-spacer'></div>")?;
|
||||
}
|
||||
}
|
||||
write!(w, "}}")?;
|
||||
}
|
||||
|
@ -658,6 +658,11 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.item-spacer {
|
||||
width: 100%;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
span.since {
|
||||
position: initial;
|
||||
font-size: 20px;
|
||||
|
Loading…
Reference in New Issue
Block a user