Add spacing between trait functions

This commit is contained in:
Guillaume Gomez 2017-07-09 00:40:29 +02:00
parent 4d4d76cf42
commit 12dccbde41
2 changed files with 14 additions and 2 deletions

View File

@ -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, "}}")?;
}

View File

@ -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;