rustdoc: print arguments to bare functions on their own line
This commit is contained in:
parent
4c04e36f94
commit
9cfd4ef38f
1 changed files with 5 additions and 1 deletions
|
|
@ -618,11 +618,15 @@ pub fn fmt_impl_for_trait_page(i: &clean::Impl, f: &mut fmt::Formatter) -> fmt::
|
|||
impl fmt::Display for clean::Arguments {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
for (i, input) in self.values.iter().enumerate() {
|
||||
if i > 0 { write!(f, ", ")?; }
|
||||
write!(f, "\n ")?;
|
||||
if !input.name.is_empty() {
|
||||
write!(f, "{}: ", input.name)?;
|
||||
}
|
||||
write!(f, "{}", input.type_)?;
|
||||
if i + 1 < self.values.len() { write!(f, ",")?; }
|
||||
}
|
||||
if !self.values.is_empty() {
|
||||
write!(f, "\n")?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue