rustdoc: if a where clause gets any lines, it gets its own line
This commit is contained in:
parent
07b27bb34c
commit
43abad4583
1 changed files with 3 additions and 1 deletions
|
|
@ -208,7 +208,9 @@ impl<'a> fmt::Display for WhereClause<'a> {
|
|||
clause.push_str("</span>");
|
||||
let plain = format!("{:#}", self);
|
||||
if plain.len() + pad.len() > 80 {
|
||||
let padding = if pad.len() + 25 > 80 {
|
||||
//break it onto its own line regardless, but make sure method impls and trait
|
||||
//blocks keep their fixed padding (2 and 9, respectively)
|
||||
let padding = if pad.len() > 10 {
|
||||
clause = clause.replace("class='where'", "class='where fmt-newline'");
|
||||
repeat(" ").take(8).collect::<String>()
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue