Force backline on all where in docs
This commit is contained in:
parent
d8801287a3
commit
cbfc8fe3eb
@ -165,7 +165,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
if f.alternate() {
|
||||
clause.push_str(" where ");
|
||||
} else {
|
||||
clause.push_str(" <span class='where'>where ");
|
||||
clause.push_str(" <span class='where fmt-newline'>where ");
|
||||
}
|
||||
for (i, pred) in gens.where_predicates.iter().enumerate() {
|
||||
if i > 0 {
|
||||
@ -208,10 +208,9 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
clause.push_str("</span>");
|
||||
let plain = format!("{:#}", self);
|
||||
if plain.len() + pad > 80 {
|
||||
//break it onto its own line regardless, but make sure method impls and trait
|
||||
//blocks keep their fixed padding (2 and 9, respectively)
|
||||
// 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 > 10 {
|
||||
clause = clause.replace("class='where'", "class='where fmt-newline'");
|
||||
repeat(" ").take(8).collect::<String>()
|
||||
} else {
|
||||
repeat(" ").take(pad + 6).collect::<String>()
|
||||
|
Loading…
Reference in New Issue
Block a user